https://bugzilla.wikimedia.org/show_bug.cgi?id=27906
Summary: Parser inserts <pre> on lines begining with space in
raw html output from parser->setHook type hook.
Product: MediaWiki
Version: 1.18-svn
Platform: All
OS/Version: All
Status: NEW
Keywords: parser
Severity: normal
Priority: Normal
Component: Page rendering
AssignedTo: [email protected]
ReportedBy: [email protected]
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 <pre>";
}
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 <pre>
</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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l