Page MenuHomePhabricator

$wgUserHtml=false is asking for trouble
Closed, ResolvedPublic

Description

Usually one sees:

$ URL=...index.php?title=some_non_existant_page
$ w3m -dump $URL|sed ...
There is currently no text in this page, you can search for this page title in
other pages or edit this page.

But if one dares set $wgUserHtml = false;, holy moly, all around
the system things become ugly:

$ w3m -dump $URL|sed ...
<div class='noarticletext'>There is currently no text in this page, you can
search for this page title in other pages or edit this page.</div>

And to think the name of the variable is $wgUserHtml. It acts like an
$wgANYTHINGHtml.

DefaultSettings.php doesn't mention the extent things will break when
$wgUserHtml = false. It just says:

/** Allow limited user-specified HTML in wiki pages?

  • It will be run through a whitelist for security. Set this to false if you
  • want wiki pages to consist only of wiki markup. Note that replacements do not
  • yet exist for all HTML constructs.*/

$wgUserHtml = true;

So also mention
*Breaks system messages.
*Better edit any HTML off of existing pages first.
*some HTML tags are also wikitext tags, some wikitext tags are HTML
tags, so better get a grip on which are which, unlike yours truly.


Version: 1.7.x
Severity: minor
OS: Linux
Platform: PC

Details

Reference
bz8590

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:33 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz8590.
bzimport added a subscriber: Unknown Object (MLST).

Yeah, nothing works with that off as wiki text throughout the UI relies on it.
Don't turn it on; it'll likely get removed at some point.

Maybe we should get it removed for 1.10 ?

$wgUserHtml is no more.

Committed as r21285.