In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Advanced Details Jump to Notes ] Wiki ]  Related Changesets ] View Simple ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001423 [In-Portal CMS] Data Management bug report always 2012-11-02 06:50 2012-11-02 09:18
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Platform
Status resolved   OS
  OS Version
ETA none Fixed in Version 5.2.1-B1 Product Version 5.2.0
  Target Version 5.2.1 Product Build
Time EstimateNo estimate
Summary 0001423: Function "htmlspecialchars" breaks down UTF-8 encoding
Description I didn't new before, but function "htmlspecialchars" not only escapes text to be safe for usage inside a HTML/XML, but also converts it's encoding to ISO-8859-1 (PHP 5.3.x and below).
As a result any UTF-8 encoded string will be encoded into ISO-8859-1 (after escaping) and all special symbols (e.g. resulted from pasting text from Microsoft Word) would have incorrect encoding, when presented back to user who has UTF-8 encoding on a page.

In PHP 5.4 and up default charset for this function is UTF-8.


As a fix I propose to pass CHARSET constant's value explicitly in each call of htmlspecialchars function across all In-Portal and it's modules.
Steps To Reproduce
Additional Information
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-bugs/U6jKZhLplbQ/discussion
Change Log Message Fixes charset encoding problem from htmlspecialchars function
Estimate Points 1
Attached Files patch file icon htmlspecialchars_encoding_core_fix.patch [^] (15,383 bytes) 2012-11-02 09:13 [Show Content]
patch file icon htmlspecialchars_encoding_modules_fix.patch [^] (7,207 bytes) 2012-11-02 09:13 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0001342closed (5.2.0)alex Make UTF-8 the only one supported language encoding 

-  Notes
User avatar (0005250)
alex (manager)
2012-11-02 09:15

Will test all together later.
User avatar (0005251)
alex (manager)
2012-11-02 09:18

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001423: Function "htmlspecialchars" breaks down UTF-8 encoding

- Related Changesets
In-Portal CMS: 5.2.x r15601
Timestamp: 2012-11-02 09:18:43
Author: alex
Details ] Diff ]
Fixes 0001423: Function "htmlspecialchars" breaks down UTF-8 encoding
mod - /in-portal/branches/5.2.x/core/install/install_toolkit.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/db/db_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/db/db_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/nparser/nparser.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/processors/main_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/processors/tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/utility/debugger.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/utility/http_query.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/categories/categories_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/configuration/configuration_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/email_events/email_events_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/fck/fck_eh.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/controls/minput_helper.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/deployment_helper.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/language_import_helper.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/xml_helper.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/images/image_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/logs/change_logs/changes_formatter.php Diff ] File ]
Modules :: In-Commerce: 5.2.x r15600
Timestamp: 2012-11-02 09:17:28
Author: alex
Details ] Diff ]
Bug 0001423: Function "htmlspecialchars" breaks down UTF-8 encoding
mod - /w/in-commerce/branches/5.2.x/units/gateways/gw_classes/google_checkout.php Diff ] File ]
mod - /w/in-commerce/branches/5.2.x/units/gateways/gw_classes/ideal_nl.php Diff ] File ]
mod - /w/in-commerce/branches/5.2.x/units/gateways/gw_tag_processor.php Diff ] File ]
mod - /w/in-commerce/branches/5.2.x/units/order_items/order_items_tag_processor.php Diff ] File ]
mod - /w/in-commerce/branches/5.2.x/units/product_options/product_options_tag_processor.php Diff ] File ]
Modules :: In-Bulletin: 5.2.x r15599
Timestamp: 2012-11-02 09:17:00
Author: alex
Details ] Diff ]
Bug 0001423: Function "htmlspecialchars" breaks down UTF-8 encoding
mod - /modules/in-bulletin/branches/5.2.x/units/helpers/post_helper.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-11-02 09:18 alex Note Added: 0005251
2012-11-02 09:18 alex Status reviewed and tested => resolved
2012-11-02 09:18 alex Fixed in Version => 5.2.1-B1
2012-11-02 09:18 alex Resolution open => fixed
2012-11-02 09:18 alex Assigned To !COMMUNITY => alex
2012-11-02 09:18 alex Changeset attached 5.2.x r15601
2012-11-02 09:17 alex Changeset attached 5.2.x r15600
2012-11-02 09:17 alex Changeset attached 5.2.x r15599
2012-11-02 09:15 alex Note Added: 0005250
2012-11-02 09:15 alex Status needs testing => reviewed and tested
2012-11-02 09:15 alex Assigned To => !COMMUNITY
2012-11-02 09:15 alex Developer => alex
2012-11-02 09:15 alex Status active => needs testing
2012-11-02 09:13 alex File Added: htmlspecialchars_encoding_modules_fix.patch
2012-11-02 09:13 alex File Added: htmlspecialchars_encoding_core_fix.patch
2012-11-02 08:54 alex Relationship added related to 0001342
2012-11-02 06:50 alex version => 5.2.0
2012-11-02 06:50 alex Target Version => 5.2.1
2012-11-02 06:50 alex New Issue
2012-11-02 06:50 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/U6jKZhLplbQ/discussion
2012-11-02 06:50 alex Change Log Message => Fixes charset encoding problem from htmlspecialchars function
2012-11-02 06:50 alex Estimate Points => 1



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker