[MAGNOLIA-2101] [PATCH] Problem with using dollar sign in URLs Created: 04/Apr/08  Updated: 23/Jan/13  Resolved: 10/Jul/08

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.5.4
Fix Version/s: 3.6, 3.5.9

Type: Bug Priority: Minor
Reporter: Simon MacMullen Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File linkhelper-appendreplacement-escaping.patch    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

We want to be able to create URLs like "/foo/bar.html?var=${some_var}" in the FCK editor in Magnolia. We then post-process the content once it comes out of Magnolia to substitute in the variable.

Unfortunately putting a dollar sign in the URL causes "IllegalArgumentException: Illegal group reference" to be thrown in info.magnolia.cms.link.LinkHelper.convertUsingLinkTransformer() as it fails to escape the dollar sign before passing it as the second argument to Matcher.appendReplacement().

The attached patch fixes this issue and adds an extra test case for it.



 Comments   
Comment by Magnolia International [ 10/Jul/08 ]

Patch applied on both 3.5 branch and trunk(3.6) thanks !

Generated at Mon Feb 12 03:33:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.