A user can enter a custom "raw" signature in their preferences.
The linter should run on this field and at least indicate that the signature is not good enough.
Following that, the system might either prevent the user from saving his preferences, or ignore the custom signature in favor of the default system signature until such time as the raw signature passes the linter check.
Might possibly use the work in T163091: Parsoid: Add API endpoint to get lint errors for arbitrary wikitext.
Dependencies
The patches to meet the "Requirements" described below should NOT be merged until the following tickets are resolved:
- T254613: Post final requirements and implementation plan to proposal page
- T254614: Notify "tech audiences" about signature requirement consultation outcomes
Requirements
- When someone attempts to save a signature that meets either of the conditions below, prevent the signature from being saved and present a message that explains to people: 1) that their signature cannot be saved as it is currently written, 2) why their signature cannot be saved as it is currently written and 3) what changes they need to make to the signature they have written in order to save it.
- Conditions:
- The signature contains any lint errors
- The signature contains misnested tags (both kinds) or stripped tags
- Conditions:
- Note: this change should not affect current signatures that would become invalid as a result of this change, as noted in T140606#5829318
Testing details
Scenario A
- Visit: https://en.wikipedia.org/wiki/Special:Preferences
- Navigate to the Signature section
- Check the Treat the above as wiki markup box
- Enter a signature like: [[User:YOUR USERNAME]] <small>[[User talk:YOUR USERNAME]]<small>
- Click Save
- Notice the follow message appears beneath the Signature: text field: Your signature contains invalid or deprecated HTML syntax: …
- Notice a "Show error location" button; clicking it selects text from the first <small> tag to the end
Scenario B
- Enter a signature like: [[User:YOUR USERNAME]] '''[[User talk:YOUR USERNAME]]
- Click Save
- Notice the follow message appears beneath the Signature: text field: Your signature contains invalid or deprecated HTML syntax: …
- Notice a "Show error location" button; clicking it selects text from the ''' syntax to the end
Done
- Patches are written that meet the "Requirements" described above