Last modified: 2014-03-19 19:34:45 UTC
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.
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.