Page MenuHomePhabricator

Automatically (or manually, server-side) fix user signatures containing Lint errors
Open, LowPublic

Description

User signatures, at least on enwiki, are continually introducing new Lint errors, for example due to the use of the <font> tag in @Tony1's edit this morning (sorry, I just used your edit because I remembered your signature had a font tag in it). This is compounded by a Tidy issue, T25467 (see this discussion), related to the nesting of links directly inside the font tag. Rather than stopping thousands of editors' signatures from being coloured, or having a bot clean up after every signature with a font tag, users' signatures could be manually modified on the server side (if it's possible?) or some other automatic conversion could be done. Failing that users could be told to change their signature upon logging in.

Event Timeline

Jc86035 renamed this task from User signatures continually introducing Lint errors to Automatically (or manually, server-side) fix user signatures containing Lint errors.Oct 24 2017, 10:22 AM
Jc86035 updated the task description. (Show Details)

I don't understand this quite yet.

@Tony1's signature does not suffer from the T25467 issue, i.e. the font can be replaced with a span and it will render fine. We are right now not requiring editors to replace <font> tags -- it is a wiki-specific decision. The Linter is only flagging it for attention in a low-priority category.

On existing pages, where signatures have already been subst-ed, it is hard to automatically detect signatures (without introducing complexity and slowing down parsing) and fix them.

But, if you are suggesting that we fix user signatures in the database, we could ... but, not sure how editors would feel about that.

@Elitre, @Jdforrester-WMF .. see above.

I don't think we should start any automatic edits to fix this until after we've forced all users to change their signatures (ideally, to never ever style them, as it's fundamentally impossible to be accessible).

What we can do depends on how severe we deem this is. Something low-priority requiring people to be forced to do something sounds contradictory. (What do you mean by forcing BTW? Would that mean that they get a warning, or that we need to convey a message about how styling signatures is "deprecated" from now on or something?)

I don't think users should be forced not to style their signatures, except maybe as part of implementing Flow/Structured Discussions if signatures would be removed entirely. You could do it, but there's no technical reason to have to do it unless you're disabling signatures or replacing them with a metadata tag for whatever reason. Signatures are usually identifiable as signatures, and the only screen reader user I've come across on enwiki formats his own signature, so I don't know if it's necessary or valid to disable them for accessibility.

The Linter is only flagging it for attention in a low-priority category.

I don't understand this statement. The use of <font> in signatures lands a whole heck of a lot of talk pages in the high priority tidy font bug category.

The "tidy font bug" category was added after @ssastry's comment, I think. Previously they only showed up in the low-priority category for deprecated tags.

The "tidy font bug" category was added after @ssastry's comment, I think. Previously they only showed up in the low-priority category for deprecated tags.

Nope! 😃 T176363#3658974

ssastry closed this task as Resolved. Oct 4 2017, 17:13

The "tidy font bug" category was added after @ssastry's comment, I think. Previously they only showed up in the low-priority category for deprecated tags.

Nope! 😃 T176363#3658974

ssastry closed this task as Resolved. Oct 4 2017, 17:13

You are referencing the html5-misnesting category. The tidy-font-bug category was deployed on the same day I made that comment. :-)

In any case, for the purposes of Tidy replacement and tidy-font-page, talk pages are not as critical since it does look like primarily user-signature related. All that will happen is that colors from their old signatures will disappear which is not catastrophic.

I think we should write a server-side script that goes through everyone's signature, and tries to rewrite it to avoid tidy bugs and the deprecated <font>. If this isn't possible due to e.g. length limits (https://en.wikipedia.org/wiki/User_talk:Ser_Amantio_di_Nicolao#Your_signature) then we should just revert them back to the default signature.

This comment was removed by Izno.

Right, Subbu pointed that out to me on IRC as well :) So in addition to the script, we also need some signature validation system. Ideally such a system would be written in PHP and could be in MediaWiki core itself rather than requiring Linter/parsoid.

Right, Subbu pointed that out to me on IRC as well :) So in addition to the script, we also need some signature validation system. Ideally such a system would be written in PHP and could be in MediaWiki core itself rather than requiring Linter/parsoid.

I realized this was the wrong ticket to talk about preventing future users. See the parent task.

In T352617 I provided some JS that could warn/correct signature issues while the user is setting it on Special:Preferences.