Tags:
create new tag
view all tags

SID-00912: Global search replace breaks greater than sign

Status: Answered Answered TWiki version: 4.1.2 Perl version:
Category: GlobalReplacePlugin Server OS: Last update: 15 years ago

With the GlobalReplacePlugin I would like to search for a text and replace it with a <!---start---> tag for including it in another topic. However when I type the greater than and less than sign '>' and '<' in the replace string, it get's expanded to

<

I already tried to escape it with a ! and by typing $gt or $lt, but these don't work.

Does anyone have an idea how to fix the greater than and less than signs?

I'm using TWiki version TWiki-4.1.2, Sat, 03 Mar 2007, build 13046, Plugin API version 1.11

-- MarianneSeverens - 2010-07-25

Discussion and Answer

That is possibly a bug introduced by security-hardening TWiki: <, >, ', ", and % are escaped by default when passed as URL parameters. This is to reduce the exposure to Wikipedia:Cross-site_request_forgery.

As a temporary fix, try to change the encoding of the URLPARAMs in the SRAHC of the GlobalSearchAndReplace topic. This is untested:

%SEARCH{ search="%URLPARAM{"search" default="do[N]othing" encode="quote"}%" scope="%URLPARAM{"scope"}%" web="%URLPARAM{"web" default="%WEB%"}%" nosearch="on" nototal="on" regex="on" noheader="on" format="$percntGLOBALREPLACE{ func=\"search\" param=\"$web.$topic\" rSearchString=\"%URLPARAM{"rSearchString" encode="quote"}%\" rString=\"%URLPARAM{"rString" encode="quote"}%\" caseSensitive=\"%URLPARAM{"caseSensitive"}%\" }$percnt" separator=" "}%

-- PeterThoeny - 2010-07-25

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2010-09-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 Global search replace breaks greater than sign
SupportCategory GlobalReplacePlugin
TWiki version 4.1.2
Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2010-09-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.