Page MenuHomePhabricator

Media viewer discarding sub / sup markup in captions
Closed, ResolvedPublic

Description

When a captioned image is displayed with Media Viewer, styling of the caption is discarded for multiple types of markup. This can change the meaning of the caption, for example when supscript and superscript characters are appended to words.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Steps to reproduce:

  1. Use session configured to use mediaviewer
  2. Go to https://en.wikipedia.org/w/index.php?title=User:Xaosflux/sandbox52&oldid=824719956
  3. Click the image
Xaosflux renamed this task from Media viewer discards markup in captions to Media viewer discards many types of markup in captions.Feb 9 2018, 3:43 AM
Xaosflux updated the task description. (Show Details)

Change 409302 had a related patch set uploaded (by TheDJ; owner: TheDJ):
[mediawiki/extensions/MultimediaViewer@master] MMV: Allow <sub> and <sup> in captions

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

These elements are intentionally filtered, but i see no reason not to add sub and sup to the whitelisted elements.

Xaosflux renamed this task from Media viewer discards many types of markup in captions to Media viewer discarding sub / sup markup in captions.Feb 9 2018, 12:47 PM
Xaosflux triaged this task as Low priority.

@TheDJ I'll re-titled this request for just that action so it can be closable, can update https://www.mediawiki.org/wiki/Help:Extension:Media_Viewer - question: I noticed "span" is in the list at mmv.HtmlUtils.js - will that drag any inline "style=" markup with it if attached to the span?

Change 409302 merged by jenkins-bot:
[mediawiki/extensions/MultimediaViewer@master] MMV: Allow <sub> and <sup> in captions

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

TheDJ claimed this task.
TheDJ removed a project: Patch-For-Review.

I noticed "span" is in the list at mmv.HtmlUtils.js - will that drag any inline "style=" markup with it if attached to the span?

I guess so.