[mapguide-trac] #349: Prompt text in search commands can't include
line breaks.
MapGuide Open Source
trac_mapguide at osgeo.org
Thu Nov 29 05:25:24 EST 2007
#349: Prompt text in search commands can't include line breaks.
---------------------------+------------------------------------------------
Reporter: mbeckman | Owner:
Type: defect | Status: new
Priority: medium | Milestone:
Component: AJAX Viewer | Version:
Severity: minor | Keywords:
External_id: |
---------------------------+------------------------------------------------
If the user inserts a line break in the prompt text in a search command a
java script error will prevent the ajaxviewer from loading.
Example:[[BR]]
This text will work:[[BR]]
"Search for places beginning with: Example 'holly' will return
'hollywood'"[[BR]]
This text will not work:[[BR]]
"Search for places beginning with:[[BR]]
Example 'holly' will return 'hollywood'"
This could be fixed by replacing the new line characters with a html new
line tag, so the this text would work:[[BR]]
"Search for places beginning with:<br>Example 'holly' will return
'hollywood'"
To make sure there are no line breaks in the prompt text a quick solution
for the phpviewer would be to change line 229 from[[BR]]
StrEscape($cmd->GetPrompt()),[[BR]]
to[[BR]]
str_replace("\n", "<br>", StrEscape($cmd->GetPrompt())),
Note: This also happens for the DWF viewer, but it is fixed with the same
code.
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/349>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list