Page MenuHomePhabricator

Disallow line break (p tag) within signatures
Open, Needs TriagePublicFeature


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

  • Create a custom signature on en.WP containing a set of p tags
  • Save it

What happens?:
The software allows the signature to be saved.

What should have happened instead?:
The software should not allow the signature to be saved, per

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
This appears to be a regression. Possibly related: T255324.

Event Timeline

I don't think it's a regression.

We only disallowed using literal line break characters (e.g. by using {{#invoke:ustring|char|10}} in your signature), because that interferes with the : markup used for indentation. I just tested using that on English Wikipedia and I got the error "Your signature must consist of a single line of wikitext.", as expected. Beyond the minimal technical requirements we prefer to leave it to the communities to decide what to allow in signatures.

Markup like <p> or <br> isn't disallowed (although using that doesn't seem like a great idea to me personally), because it doesn't interfere with the : markup used for indentation (or at least it wasn't known to interfere until you filed T329783 – I wonder what turns out to be the cause of that problem).

FWIW, AntiCompositeNumber's signature-checking tool at, which was created as part of the "enforce signature requirements" project, reports p and br tags as errors.

@Jonesey95: thank you for filing this. We're going to treat this as a feature request, seeing as how when we implemented these signature requirements we did not express an opinion about whether people ought to be able to use tags like <br>, <div>, and <p> within their signatures. [i]

i. Topic:W4sx12qy3xt2kshe

Signatures now includes a default check for line breaks, defined as \n <br> <div> <p>. There are 23 occurrences on enwiki. Most seem to be accidental or otherwise what we're trying to prohibit, but there are a few like Ahecht who are using it to stack text inside their signature. That's still probably problematic, and should be done differently.

@Matma Rex will correct me if I'm wrong, but I think that <br> (if it's typed as the HTML code, not if it's typed by pressing ↵ Enter) is okay.

ppelberg renamed this task from Line break (p tag) allowed in signature; possible regression to Disallow line break (p tag) within signatures.Mar 23 2023, 3:38 PM
ppelberg moved this task from Backlog to Triaged on the DiscussionTools board.
HouseBlaster changed the subtype of this task from "Bug Report" to "Feature Request".Feb 9 2024, 4:19 AM