Skip to main content
Participant
December 14, 2011
Question

%20 encoding as %2520 in LinkElement

  • December 14, 2011
  • 1 reply
  • 4423 views

I have a LinkElement in a RichEditableText's textflow. The link's href has encoded spaces in it (%20).

If I catch a click event and debug down to the LinkElement level the href still appears correct, however when it opens in new browser tab the url has been re-encoded
ie %20 is now %2520 - as the % sign has itself been encoded. Is there a way that I can stop this behavior?

Thanks

This topic has been closed for replies.

1 reply

Participating Frequently
December 15, 2011

Hi davidg84, You can uses real space in your URL, like "www.abc.com/bcd def.html", then TLF will help you handle your spaces.

davidg84Author
Participant
December 15, 2011

Thanks for your answer, my issue though is that users can enter in abritrary links, they may paste them from an address bar and be unaware of url encoding. What I'd prefer is for the url to be assumed correct and not encoded.

Is there somewhere I can intercept before the url gets encoded again?

Participating Frequently
December 16, 2011

In your case, the only way is after you get users' input, handle the url by yourself, remove %20 and replace it with space, then pass the new url to TLF. Hope this helps.