Ampersand is wrongly escaped in href attribute.
See original GitHub issueThis is related to #189 But still not solved.
Thymeleaf seems to be escaping the & character while rendering the th::href attribute
as a comment to this issue @jmiguelsamper said
Escaping ampersand inside an attribute is correct HTML.
If this is the case, how could I pass the following url?
http://example.com?id=20&somevar=content_with_&rr=29
Here, I have only two parameters: id => 20 and somevar => content_with_&rr=29
but according to the reply, it will have three parameters (id => 20, somevar => content_with_, rr =>29)
Also when I tried https://www.google.co.in/search?source=hp&q=thymeleaf instead of https://www.google.co.in/search?source=hp&q=thymeleaf I got the wrong page. So clearly, & is not same as & in urls.
So can you tell me how can I add & in urls with Thymeleaf?
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
But how do I solve the problem with emails?
@harikk did you solve this? I am having similar issue!
I understand that escaping & into & is correct way and it doesn’t really change the actual url, but we use a system which reads the URLs and it doesn’t work with escaped characters and I do not have any control over it.