Opened 2 years ago
Closed 18 months ago
#13720 closed defect (fixed)
WEB: link URLs are garbled in Touche's compatibility page
Reported by: | JKingweb | Owned by: | Thunderforge |
---|---|---|---|
Priority: | low | Component: | Web |
Version: | Keywords: | ||
Cc: | Game: | Touché: The Adventures of the Fifth Musketeer |
Description
The lowercase e with acute accent seems somehow to be completely mangling the game's ScummVM wiki and Wikipedia link URLs on its compatibility page. They are correct as far as "Touch" and then the "Support Level" section's data is spewed into the URL from there before it resumes with the title.
This has been observed in Firefox 102 for Android as well as Vivaldi 3.5 forinux, if it matters. It seems to be a server-side templating error to me, though.
Change History (5)
comment:1 by , 2 years ago
Component: | Documentation → Web |
---|---|
Owner: | set to |
Resolution: | → assigned |
Status: | new → pending |
Summary: | link URLs are garbled in Touche's compatibility page → WEB: link URLs are garbled in Touche's compatibility page |
comment:2 by , 2 years ago
The data looks right in the YAML file and generated database, and a preliminary search shows it's loaded properly in the backend when sent to the frontend. I think it's one of the Smarty filters that is misbehaving.
comment:3 by , 2 years ago
Turns out that it's not Smarty on it's own, but rather HTMLPurifier. Commenting out this line fixes the hyperlink. However, the purpose of that is to prevent XSS, so I'm reluctant to do that.
Basically
- HTMLPurifier converts the
é
toA9
- For reasons I don't undersatnd, Smarty converts that to the value of
%good%
in whatever the current language is
comment:4 by , 18 months ago
The HTMLPurifier is not the real culprit. All links with two %
are misbehaving, whether those come from the HTMLPurifier or are already present in the spreadsheet (for example Putt-Putt_%26_Fatty_Bear%27s_Activity_Pack
).
On discord Digitall suggested that the issue is coming from the compatibility_details.tpl
, and in particular this line, and I think he is right:
{$game->getNotes()|regex_replace:"/%.+%/":$support_description}
comment:5 by , 18 months ago
Resolution: | assigned → fixed |
---|---|
Status: | pending → closed |
This issue is fixed by ScummVM web PR #298.
The encoding for the "é" character is %C3%A9 , "A9" is still present in the garbled entries so I suppose that whatever is used to generate the page wrongly replaces %C3% with that string (the page is generated from a spreadsheet and that looks like a cell coordinate)