[fusion-trac] #543: xml2json.php should not include a semi-colon at the end

Fusion trac_fusion at osgeo.org
Sun Sep 16 20:01:19 PDT 2012


#543: xml2json.php should not include a semi-colon at the end
-----------------------+----------------------------------------------------
   Reporter:  jng      |       Owner:  jng   
       Type:  defect   |      Status:  new   
   Priority:  P2       |   Milestone:  Future
  Component:  Widgets  |     Version:  2.0   
   Severity:  Major    |    Keywords:        
External_id:           |       State:  New   
    Browser:  All      |          Os:  All   
-----------------------+----------------------------------------------------
 The switch to using JSON.parse over eval breaks on content returned by
 XML2JSON.php because it inserts a semi-colon at the end of the JSON
 literal (presumably to be eval()'d client-side). Since we don't eval()
 such content anymore (except for browsers that don't support a native JSON
 object), we should not be appending this semi-colon anymore.

 To preserve existing behaviour for browsers where eval() is still used, it
 should check if the JSON string ends with a semi-colon, and append one if
 required before eval()-ing the string. Still this is a stop-gap measure
 until a JSON.parse() replacement is found for these browsers.

-- 
Ticket URL: <http://trac.osgeo.org/fusion/ticket/543>
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