Double encoding in href attribute (using jsreport version: 2.6.1)
-
I have a template which has some links. When clicking on any of this link
<a href="{{:#data.links.linkId}}" target="new"> {{:linkId}}</a>
where linkId ishttp://localhost:3000/link.html?$url=http%3A%2F%2Flocalhost:3000%2Fdashboard%2Fitems%2Fid1%2Fdefault%2Fid2%2Fid3
the browser opens it as:
http://localhost:3000/link.html?$url=http%253A%2F%252Flocalhost:3000%252Fdashboard%252Fitems%252Fid1%252Fdefault%252Fid2%2Fid3
I.e. it does double encoding - %3A becomes %253A, %2F -> %252F and thus cann't find resource.
Is it a normal behaviour?
Previously, using jsreport 1.10.0 it was working without double encodings in same templates.
-
I prepared the demo showing it isn't double encoding. Are you sure you don't pass it already double encoded?
-
I guess I found the root cause. It can be reproduced using wkhtmltopdf 0.12.5 (with patched qt). Reference - https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4545.
Anyway, thank you for the reply.