[mapguide][MG300][Modified] String inlining creates toolbar script error

Alain Lebatard alain.lebatard at autodesk.com
Thu May 25 18:57:35 EDT 2006


You can view the artifact detail at the following URL:

    https://mapguide.osgeo.org/servlets/Scarab/id/MG300

Type:
Defect

Artifact ID:
MG300 (String inlining creates toolbar script error)

Modified by:
Alain Lebatard
alainlebatard (alain.lebatard at autodesk.com)

The following modifications were made to this artifact:
---------------------------------------------------------------------

-- Artifact Status changed:
Old value:
New
New value:
Resolved
-- Resolution Description set to new value:
The problem is with strings inlined within strings in HTML code. Consider the following HTML page to illustrate the problem:

<script language="javascript">
func(str) {
  alert(str);
}
</script>
<body onload="func(' \' \"  ')">
</body>

The single-quoted string embedded in the string defining the handler code cannot contain neither single nor double quotes. Even escaped as above, it creates script errors in the browser. Escaping with HTML sequence does not help either.

To workaround this problem, the code now passes an index to a string rather than the string itself to a function called from the event handler, removing the problem of quotes in nested strings.

-- Resolution set to new value:
Submitted



---------------------------------------------------------------------
This message was automatically generated by Project Tracker.








More information about the Mapguide_issues mailing list