Page MenuHomePhabricator

Can't play video thumbnail if the filename contains an apostrophe
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

What happens?:
Nothing except a flash of a dialog.

What should have happened instead?:
The video plays.

Other information:
Compare the files here.

Event Timeline

Thank you, this is a minor regression due to the rewrite of the title now being taken from the resource attribute, which is encoded.

const resourceTitle = resource ? resource.slice(resource.lastIndexOf('/') + 1) : $video.data('mwtitle');

should have been

const resourceTitle = resource ? decodeURIComponent( resource.slice(resource.lastIndexOf('/') + 1)) : $video.data('mwtitle');

Ill fix this later tonight

TheDJ triaged this task as Medium priority.Apr 26 2024, 6:50 AM
TheDJ added a project: User-TheDJ.

Change #1024728 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/TimedMediaHandler@master] Fix for encoded characters in resource attribute

https://gerrit.wikimedia.org/r/1024728

TheDJ added a project: MW-1.42-release.
TheDJ added a subscriber: Jdrewniak.

Note that there also were hits on 1.42.0-wmf.26 apparently, so this needs backporting.

Jdlrobson raised the priority of this task from Medium to Unbreak Now!.Apr 26 2024, 4:59 PM

The error rate is significant enough to trigger our email alerts for JavaScript errors and given it impacts users ability to use the site I think this should be UBN until backported.

I am unable to play "Agnus Dei from Fauré's Requiem" on https://en.wikipedia.org/wiki/Agnus_Dei for example.

Note for testers, parsoid html (not escaped resource attribute value) seems to differ from non-parsoid html (percent escaped resource attribute value) for this situation.

Change #1024728 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Fix for encoded characters in resource attribute

https://gerrit.wikimedia.org/r/1024728

Change #1024714 had a related patch set uploaded (by Jforrester; author: TheDJ):

[mediawiki/extensions/TimedMediaHandler@wmf/1.43.0-wmf.2] Fix for encoded characters in resource attribute

https://gerrit.wikimedia.org/r/1024714

Change #1024714 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@wmf/1.43.0-wmf.2] Fix for encoded characters in resource attribute

https://gerrit.wikimedia.org/r/1024714

Mentioned in SAL (#wikimedia-operations) [2024-04-29T14:14:30Z] <reedy@deploy1002> Synchronized php-1.43.0-wmf.2/extensions/TimedMediaHandler/: T363550 (duration: 14m 42s)

Change #1025317 had a related patch set uploaded (by Jforrester; author: TheDJ):

[mediawiki/extensions/TimedMediaHandler@REL1_42] Fix for encoded characters in resource attribute

https://gerrit.wikimedia.org/r/1025317

Change #1025317 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@REL1_42] Fix for encoded characters in resource attribute

https://gerrit.wikimedia.org/r/1025317

Thanks for the speedy fix and backport!

Screenshot 2024-04-29 at 1.29.54 PM.png (256×1 px, 32 KB)

I thought the fix for this task might fix T363630: Score audio cannot be played if the page has other embedded media too, but that one is still happening so apparently not.

No it is separate. I’m travelling now, but maybe I ll look at that during the hackathon next weekend

@Arlolra just wanted to get back to this issue that the resource attribute value is percent encoded in the old parser but unescaped in the Parsoid html. Is that known to the parser team ?