Page MenuHomePhabricator

Edit summary label broken
Closed, DeclinedPublic

Description

Screenshot

If [[MediaWiki:Summary]] contains HTML, after the scap to r51863 the label for the edit summary text field reads

<a href="/wiki/Help:Edit_summary" class='internal' title="Briefly describe the changes you have made" target="_blank">Edit summary</a> (Briefly describe the changes you have made)

The HTML should actually be rendered by the browser. Confirmed on en and simple.

http://simple.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&action=edit

Screenshot attached


Version: 1.16.x
Severity: normal

Attached:

untitled.PNG (655×1 px, 51 KB)

Details

Reference
bz19200

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:43 PM
bzimport set Reference to bz19200.
bzimport added a subscriber: Unknown Object (MLST).

Looks like this behaviour may have been changed in r50882

Changing messages from HTML to wikitext is a good idea generally.

lastword wrote:

The < has been changed to a &lt; entity, which is why it doesn't render. (System message affected is MediaWiki:Summary.) Siebrand has identified the correct change, I think. The message uses HTML rather than wikitext because it wishes to open the link to Help:Edit summary in a new window (which I don't think wikitext can do). If it opens in the same window, users of suboptimal browsers who click to read about edit summaries will lose any edits they've made when clicking the back button.

herd wrote:

To anyone directed here from WMF wikis:

Per the WONTFIX, I've enlisted some steward help to remove some of the more awful breaks in this message.

Note that it was a valid concern to use <a target="_new"> or _blank or such for browsers that would not cache the edit page if you left it, but inserting raw <script> into this message is very bad. Please migrate any javascript to MediaWiki:Common.js (for things like addTags, use innerHTML or createElement to add the links anywhere on the edit page). The <a target> can also be done via javascript http://en.wikipedia.org/wiki/User:Dinoguy1000/scripts/safeIEeditlinks.js (though this is a stopgap fix).

overlordq wrote:

*** Bug 19250 has been marked as a duplicate of this bug. ***