[fusion-trac] #431: Accented characters in layer legend label cause
XML parser error in Legend.php
Fusion
trac_fusion at osgeo.org
Mon Jan 24 04:47:35 EST 2011
#431: Accented characters in layer legend label cause XML parser error in
Legend.php
------------------------+---------------------------------------------------
Reporter: liuar | Owner: liuar
Type: defect | Status: new
Priority: P2 | Milestone: Future
Component: MapGuide | Version: 2.0
Severity: Major | Keywords:
External_id: | State: New
Browser: All | Os: All
------------------------+---------------------------------------------------
This defect is caused the PHP encoding function used in Legend.php
There are two PHP functions to convert characters to HTML entities:
- htmlentities — Convert all applicable characters to HTML entities
- htmlspecialchars — Convert special characters to HTML entities
htmlentities function was used in Legend.php which converted the accented
characters to HTML entities, and some of the HTML entities are not valid
XML characters (legendLabel is stored in XML).
So, It's proper to replace htmlentities with htmlspecialchars, so that
accented
characters will not be converted.
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/431>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list