Page MenuHomePhabricator

Literal HTML displayed in preview of LDR reference backlinks
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
Izno
Tue, Apr 7, 4:45 AM
Referenced Files
F75313630: image.png
Wed, Apr 8, 10:04 AM
F75208339: image.png
Tue, Apr 7, 4:45 AM
F75208308: image.png
Tue, Apr 7, 4:45 AM
F75208131: image.png
Tue, Apr 7, 4:45 AM
F75208086: image.png
Tue, Apr 7, 4:45 AM

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Live preview:

image.png (425×1 px, 184 KB)

Show preview button:

image.png (585×1 px, 168 KB)

What should have happened instead?:
The carets should display as bold text instead, without literal HTML displayed.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Original discussion at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#HTML_bold_tags_displayed_literally_for_LDRs

This is not an issue if previewing the whole article. Live preview:

image.png (708×1 px, 325 KB)

Preview button:

image.png (621×1 px, 295 KB)

Event Timeline

I haven't been able to reproduce this locally yet, but there are two strange details worth mentioning already: the customized message is using ''''' to format text, but the problematic rendering shows an HTML tag <b>. And when I section-edit and preview a ref usage which is defined in a LDR outside of the section, I see an error (which is also problematic) rather than the raw tag: "<ref> tag with name ldr1 cannot be previewed because it is defined outside the current section or not defined at all."

Interesting: I still can't reproduce the issue locally, but I can see it on enwiki.

Locally:

image.png (311×1 px, 74 KB)

@Izno Okay, it seems to be caused by customization of this message: https://en.wikipedia.org/w/index.php?title=MediaWiki:Cite_reference_backlink_symbol -- The workaround is to remove the tags there, until a code fix can be deployed.

Change #1268912 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/Cite@master] Allow HTML in the backlink up arrow symbol

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

Change #1268940 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/WikiEditor@master] Remove bad parsing of plain text help panel headings

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

Change #1268943 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Fix wrong parsing of plain text cite_reference_backlink_symbol

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

Change #1254112 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Remove not needed space from zero backlink formatter

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

And when I section-edit and preview a ref usage which is defined in a LDR outside of the section, I see an error (which is also problematic) rather than the raw tag: "<ref> tag with name ldr1 cannot be previewed because it is defined outside the current section or not defined at all."

This message is intended (if suboptimal).

@Izno Okay, it seems to be caused by customization of this message: https://en.wikipedia.org/w/index.php?title=MediaWiki:Cite_reference_backlink_symbol -- The workaround is to remove the tags there, until a code fix can be deployed.

The me of yesteryear predicting this issue but without the prediction: https://en.wikipedia.org/wiki/MediaWiki_talk:Cite_reference_backlink_symbol#Set_to_^ . What is the appropriate way to avoid regressing display in this view?

Change #1268940 merged by jenkins-bot:

[mediawiki/extensions/WikiEditor@master] Remove bad parsing of plain text help panel headings

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

Thanks a lot for the quick responses, @Izno and @jhsoby. Both en and no are fixed for the moment and can stay like that.

Here is a possible alternative to make the character bold in the WikiEditor (2010) help panel. Unfortunately I'm not sure where that CSS should ideally go.

#wikiEditor-section-help .mw-cite-backlink > a {
    font-weight: bold;
}

Change #1268912 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Cite@master] Allow HTML in the backlink up arrow symbol

Reason:

Fixed on-wiki for the moment.

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

Change #1254112 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Remove not needed space from zero backlink formatter

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