Tags:
create new tag
view all tags

SID-01377: Keyword search on string with special characters

Status: Answered 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

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title Keyword search on string with special characters
SupportCategory CategorySearch
TWiki version 5.1.0
Server OS Debian 6.0
Web server Apache 2.2.3
Perl version 5.0
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2012-01-13 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.