Support Article
URLs are getting formatted incorrectly when hastag is added
SA-35692
Summary
When an email treatment rule has a URL link containing a # character the source gets corrupted, and link does not work.
Error Messages
No errors in rule, but link may fail when clicked in the generated emails.
Steps to Reproduce
- Open an Email Treatment rule.
- Click the "Insert Button" icon on the far right of the editor.
- Set the function to External URL and enter "http://www.google.com/hash#test" and submit, and save the rule.
- Switch to the code view. Part of the HTML has been corrupted. A "<" character is replaced with "~#":
~#pega:param name='URL' value='http://www.google.com/hash#test'/#~
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Perform the following local-change:
Copy the HTML code required into a non auto generated section rule, and use the section in the email treatment.

LinkTest Section contains the pasted HTML code:

Published April 12, 2017 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.