SID-01377: Keyword search on string with special characters
| Status: |
Answered |
TWiki version: |
5.1.0 |
Perl version: |
5.0 |
| Category: |
CategorySearch |
Server OS: |
Debian 6.0 |
Last update: |
14 years ago |
I've implemented a search tool using an html textbox, a submit button, and a SEARCH with a nested URLPARAM. For most queries, it works as expected --- However, I noticed that when the search string contains an apostrophe, the character is translated into its HTML encoded equivalent and the search is performed on the translated string. I am guessing this is happening in the URLPARAM, because the string that gets posted to the URL has apostrophe intact.
How can I change the URLPARAM variable expression so that the search string comes back from the URL as-entered?
--
JordanEcker - 2012-01-13
Discussion and Answer
You need to escape URLPARAM values properly, and this depends where it is used. See
encode="" parameter in
VarURLPARAM.
--
PeterThoeny - 2012-01-13
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.