Entities in links
mleicester - June 1, 2005 - 09:51
| Project: | Context links |
| Version: | 4.6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
If a URL contains an ampersand, the ampersand is not encoded as & when the link is output. This breaks XHTML validation. I've wrapped the URL generation in an htmlentities() call, but this will break URLs where ampersands were entered in entity form in the first place, i.e. my solution will encode [?:http://url?first=1&second=2 link] correctly, but doubly encode [?:http://url?first=1&second=2 link], incorrectly.
Any ideas for a better solution?
