This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5919 - Calls to the "result" template fails when the replacement strings contain characters $ and \
Summary: Calls to the "result" template fails when the replacement strings contain cha...
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: fd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-31 07:39 UTC by fd
Modified: 2008-07-31 07:47 UTC (History)
0 users

See Also:


Attachments

Description fd 2008-07-31 07:39:17 UTC
When the "result" template is called with replacement strings that contain "$" and/or "\", the template crashes.

That's normal, since those characters have a special meaning and must be escaped in replacement_string in the following call:
 replace(string_to_parse, regexp_to_use, replacement_string)
Comment 1 fd 2008-07-31 07:47:57 UTC
New function:
 moki:escape-for-replace

defined in functions.xsl, and called from the "result" template on both replace1 and replace2 strings.