Last modified: 2011-03-07 03:53:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29906, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27906 - Parser inserts <pre> on lines begining with space in raw html output from parser->setHook type hook.
Parser inserts <pre> on lines begining with space in raw html output from par...
Status: RESOLVED DUPLICATE of bug 1319
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.18.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-07 02:04 UTC by Bawolff (Brian Wolff)
Modified: 2011-03-07 03:53 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bawolff (Brian Wolff) 2011-03-07 02:04:27 UTC
Noticed in DynamicPageList extension. Bug appeared sometime after that extension was written, but before 1.15 was released (since 1.15 is earliest release I had installed to test with).

Consider the following code:

$wgHooks['ParserFirstCallInit'][] = 'testprefunc';
function testprefuncrender () {
        return "This should be raw html! See <blink>no filtering</blink>.\n Oh look, there's a &lt;pre&gt;";
}
function testprefunc ($parser) {
        $parser->setHook( 'pretest', 'testprefuncrender' );
        return true;
}

When you put <pretest/> in a wiki page, this inserts the following html:

<p>This should be raw html! See <blink>no filtering</blink>.
</p>
<pre>Oh look, there's a &lt;pre&gt;

</pre>

Expected behaviour, at least what makes sense to me, would be for the parser to out the return value of the function verbatim, not inserting  <pre> or <p> tags. I'm pretty sure that was what the behaviour used to be.
Comment 1 Bawolff (Brian Wolff) 2011-03-07 03:53:07 UTC
Apparently I don't know how to search for duplicates. Although I thought this used to work...

*** This bug has been marked as a duplicate of bug 1319 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links