dboehmer / coocook

👨‍🍳🦉 Web application for collecting recipes and making food plans
https://coocook.org/
Other
11 stars 2 forks source link

Encode URLs in HTML attributes #160

Open dboehmer opened 2 years ago

dboehmer commented 2 years ago

In another project I just realized that URLs may not be simply pasted in HTML element attributes.

Special characters are in fact URL-encoded but URLs like foo?a=1&b=2 might contain & which is a reserved character in HTML.

$ ack '="\[% .*url' root/templates/
root/templates/project/import.tt
3:<form method="post" action="[% import_url %]" class="import">

...

Rough estimate: >200 occurrences

Could be solved with #120