Page MenuHomePhabricator

<onlyinclude> stops working on transclusion when non-standard tag formatting is used
Open, LowPublicBUG REPORT

Description

Most tags support weird casing and odd formatting while still working, like <nOinclUDE >. However, <onlyinclude> seems to only support this odd formatting on the page its placed on, and not during transclusion.

Reproduction:
Create a page with weirdly cased tags, like the following:

Start
<onlyincludE>Message 1</onLyinclude>
<NoiNclude>Message 2</noinclUDE>
<incLudeONly  >Message 3</IncludeOnly >
End

When viewing this page, we get the following, which is expected behaviour:

Start Message 1 Message 2
End

However, when another page transcludes this, it produces the following text:

Start <onlyincludE>Message 1</onLyinclude>
Message 3 End

In this test case, both noinclude and includeonly have functioned correctly, but the onlyinclude tags seem to be lost during processing on the transclusion, giving it out as regular text instead.

Existing testcases
Links with these examples already in place on the test2 wiki:
A page with the content
A page transcluding the content

Event Timeline

Aklapper added a project: MediaWiki-Parser.

Why do people do this? :)