Opened 16 years ago

Closed 15 years ago

#349 closed defect (fixed)

Prompt text in search commands can't include line breaks.

Reported by: mbeckman Owned by: jng
Priority: medium Milestone:
Component: AJAX Viewer Version:
Severity: minor Keywords:
Cc: External ID:

Description

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:
This text will work:
"Search for places beginning with: Example 'holly' will return 'hollywood'"
This text will not work:
"Search for places beginning with:
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:
"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
StrEscape($cmd->GetPrompt()),
to
str_replace("\n", "<br>", StrEscape($cmd->GetPrompt())),

Note: This also happens for the DWF viewer, but it is fixed with the same code.

Change History (3)

comment:1 by mbeckman, 16 years ago

Sorry, forgot to type what file to make the changes in, should be file mainframe.php.

comment:2 by jng, 15 years ago

Owner: set to jng

comment:3 by jng, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in r3752

Note: See TracTickets for help on using tickets.