#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.

Example:
https://wiki.scummvm.org/index.php?title=TouchGame%20may%20have%20minor%20issues%20that%20do%20not%20impact%20the%20experience.%20Games%20can%20be%20played%20all%20the%20way%20through.A9:_The_Adventures_of_the_Fifth_Musketeer

Change History (5)

comment:1 by tag2015, 19 months ago

Component: DocumentationWeb
Owner: set to Thunderforge
Resolution: assigned
Status: newpending
Summary: link URLs are garbled in Touche's compatibility pageWEB: link URLs are garbled in Touche's compatibility page

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)

comment:2 by Thunderforge, 18 months 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 Thunderforge, 18 months 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 é to A9
  • For reasons I don't undersatnd, Smarty converts that to the value of %good% in whatever the current language is

comment:4 by criezy, 12 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 Thunderforge, 12 months ago

Resolution: assignedfixed
Status: pendingclosed

This issue is fixed by ScummVM web PR #298.

Note: See TracTickets for help on using tickets.