Page MenuHomePhabricator

ignore "display:none;" inside displaytitle
Closed, ResolvedPublic

Description

Using "display:none;" inside displaytitle (for the full or for parts) makes it hard to copy and using as the page title for wikilinks. That break the intention of displaytitle (if $wgRestrictDisplayTitle is true).

It is possible to ignore <(div|span) style="display:none;"></(div|span)> when parsing displaytitle?

Thanks.


Version: 1.22.0
Severity: normal

Details

Reference
bz26547

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:24 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz26547.

soxred93 wrote:

It'd probably be a good idea just to ignore all divs/spans... people could also do something like "position:absolute;" and all sorts of other hacks like that... Just ignore all divs/spans to get rid of this displaytitle abuse anyway.

if $wgRestrictDisplayTitle is true afaik the display title can only be something that is sanatized to the same as the real title of the article.

If it's off it can be anything, and many wikis use it to give certain pages or a category of pages certain background/font-colors, using templates like:

{{DISPLAYTITLE:<small>something: </smal><span whatever>{{SUBPAGENAME}}</span>}}

bluehairedlawyer wrote:

I've upgraded this bug from enhancement to normal, as the existence of the bug allows editors to override the rule established by $wgRestrictDisplayTitle and break the rule that a copied and pasted page title should link to the it was copied from.

What ever happened to the plan of including the proper title in a subtitle for any display title that didn't normalize back to the title?

(In reply to comment #4)

What ever happened to the plan of including the proper title in a subtitle for
any display title that didn't normalize back to the title?

Please open a bug for that, if you want that. Thanks.

Still valid. We already strip some inline CSS, this shouldn't be that hard to do.

Related URL: https://gerrit.wikimedia.org/r/64911 (Gerrit Change Ie162535b6bcbebce4ee69f6dcc1957ccccc3c672)

Side note, that tag blacklist is out of date from what I rebember.

Related regression: bug 49015