Page MenuHomePhabricator

VisualEditor allows the insertion of obsolete tags inside template parameters that are treated as raw wikitext
Open, Needs TriagePublicBUG REPORT

Description

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

What happens?:
The edit is accepted. Example: https://en.wikipedia.org/w/index.php?title=National_Order_of_the_Cedar&diff=1225182514&oldid=1222502912

What should have happened instead?:
An edit that adds obsolete tags using the Visual Editor should not be accepted. Linter has been flagging center tags as obsolete for at least six years. There is no good reason to add them to articles.

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

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

Event Timeline

This is tangentially related to T52182. If I want to center a template parameter value, it should be straightforward for an editor to select it, cut it, insert Template:Center, and then past the template parameter value into the nested template. Instead, once I am inside the template parameter value editing box, I lose access to the template insertion menu. That encourages the use of obsolete methods.

Pppery renamed this task from VisualEditor allows the insertion of obsolete tags to VisualEditor allows the insertion of obsolete tags inside template parameters that are treated as raw wikitext.Thu, May 23, 2:50 AM
Pppery subscribed.

Until T52182 is resolved I think it's not VisualEditor's responsibility to censor the input the user passes to a template parameter.

Until T52182 is resolved I think it's not VisualEditor's responsibility to censor the input the user passes to a template parameter.

Since editors are inserting raw wikitext, they could just as easily insert a template like {center} rather than obsolete tags. Resolving T52182 would make it easier, but I don't see it as blocking this task.

It doesn't technically block this task. It's my personal opinion that this shouldn't be done on general principles that would cease to be relevant once that task is done. That opinion is of no weight since I'm not a VisualEditor developer and would not be the one writing the code to do this even if I agreed with you.

I'm inclined to say that VE shouldn't meddle with parameters inside the template editor that've been provided by a user in plain text. If we want that to happen, we should go all-in and have type="content" params (which are currently displayed as a textarea that you put wikitext into) instead display as an embedded VisualEditor (like we do for e.g. gallery descriptions).

Note that this wouldn't have affected the specific edit complained about in the task, because infobox_order hasn't assigned templatedata types to any of its paramaters, so we don't know anything about how to treat them. 🤷🏻

We prevent the addition of obsolete tags to user signatures. Why not elsewhere? Other editors are just going to have to fix them eventually. We are making work for ourselves by allowing these new errors to be created.