voc / voctoweb

voctoweb – the frontend and backend software behind media.ccc.de
GNU General Public License v3.0
187 stars 55 forks source link

URL-Encode links with special chars #721

Open jadyndev opened 1 year ago

jadyndev commented 1 year ago

The links to the NORTx overview page on the camp23 site is broken in Firefox (116.0.3 apple-darwin):

The source shows: /c/camp2023/Nerds der OberRheinischen Tiefebene und der xHain (N\:O:R:T:x) This is converted to: /c/camp2023/Nerds der OberRheinischen Tiefebene und der xHain (N/:O:R:T:x), which is invalid

This can be fixed by urlencoding the link in the source like this: /c/camp2023/Nerds%20der%20OberRheinischen%20Tiefebene%20und%20der%20xHain%20(N%5C%3AO%3AR%3AT%3Ax)

(encoding the \should be enough)

saerdnaer commented 1 year ago

Just for the sake of completeness, where is a working link: https://media.ccc.de/c/camp2023/Nerds%20der%20OberRheinischen%20Tiefebene%20und%20der%20xHain%20(N%5C:O:R:T:x) (We should have stripped down that tag to NORTx, and skip the long form – but now it's proably to late to change this…)

The corresponding line where we proably should fix this is here: https://github.com/voc/voctoweb/blob/c4e7039cbb31bfee73b157921b7f64725a321cf2/app/views/frontend/shared/_event_metadata.haml#L18