Page MenuHomePhabricator

HTML entities in details attribute should round-trip
Closed, DeclinedPublic

Description

Context:

GIVEN there's a page where HTML entities are used in Wikitext

<ref details="page &amp; chapter 1" name="book">Miller</ref>

AND a VE user loads that page for editing
WHEN the users changes anything on that page
AND saves the page
THEN the HTML entities will be saved in their decoded form

<ref details="page & chapter 1" name="book">Miller</ref>
Note:

It seems that critical charachters like &quot; (") and &gt; (>) are note affected otherwise article might break completely.

Technical context:

Allowed HTML entities such as &apos; are all changed to their decoded characters after visual editing a ref. These are correctly surrounded by mw:Entity spans in Parsoid eg. <span typeof="mw:Entity" id="mwCg">'</span>, but do not round-trip yet—these characters should end up back as an HTML entity in wikitext.

Event Timeline

awight changed the subtype of this task from "Spike" to "Task".Mar 28 2025, 9:28 AM

It seems that VE does these kinds of conversions by default on all attributes contents. For example also when using &amp; in the name attribute. So this is not specific to the details feature or sub-referencing. Unless we know of any use cases where this might be a problem we won't work on that issue.