I tried to fix it myself, but could not locate the relevant code. I reported it in the wiki now (https://wiki.openstreetmap.org/wiki/Template_talk:KeyDescription#Double_URL_encoding_in_Taginfo_links).