Page MenuHomePhabricator

Clean text in MediaWiki:Deletereason-dropdown before creating a select box from them.
Open, LowestPublicFeature

Description

In MediaWiki:Deletereason-dropdown, there are several text which are:

  • shown in a <select> drop-down box,
  • put into a delete-log message, when selected.

While in the log, it is desirable to include wiki links, e.g. to project pages describing reasons, or deletion rules, such links cannot work in the dropdown box, because of limitations inherent to html.

Currently, wikilinks appear "spelt out" in the dropdown box, and do what they are supposed to do in the delete log.

I suggest to run a cleanup routine over the messages before converting them to a <select> box, which removes [[...| ]] or [[: ]] or [[ ]] and leaves the link anchor text intact.


Version: 1.13.x
Severity: enhancement

Details

Reference
bz14107

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

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

Users who are deleting are probably familiar with wikimarkup to know what those links will render as. Additionally, I would rather show it to inform the user what information will be put into the box, including links.

WONTFIX'd.

Of course, admins usually do understand wiki syntax, at least in the WMFs environment. This is not necessarily so elsewhere.

Worse is that these strings tend to be very long and looking ugly resulting in a problematic screen layout.

Of course this is an issue of low priority.

Hint: There is a good chance that the filter applied to headline contents when contructing the TOCs for pages from them does what is needed here.

I think you just want Sanitizer::stripAllTags() here after using the actual comment formatter?

I tend to agree that this may not be ideal anyway as it may hide stuff; consider in particular that everything gets appended into one giant string, and the more markup is in there, the faster it'll hit the 255-byte limit. If it's invisible markup, it's even harder to tell where you'll get cut off.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:02 AM
Aklapper removed a subscriber: Purodha.