mediawiki-extensions-Templa.../includes
Thiemo Kreuz 6129f5d589 Don't validate <templatedata> tags on non-wikitext pages
I tested this locally, and indeed: Try to edit for example your
own page http://en.wikipedia.org/wiki/Special:MyPage/common.js
Try to paste and save this:

 var notWikitext = '<templatedata>{</templatedata>';

The page fails to save. (You might not see the error message
because of T258790#6751678.)

But this is not even wikitext. The <templatedata> string is
meaningless and does not trigger any TemplateData code when
the page is parsed and saved. Still there is an additional (!)
parser run that processes every page with the wikitext parser,
no matter what the actual content model is.

This does not only cause strange stack traces (see T272231),
it's most probably a massive performance bottleneck. Luckily
the majority of pages on the Wikimedia cluster is wikitext
anyway.

Bug: T272231
Change-Id: I2efcadc9bae6ecb37314f6d45c0c520abfbb85a0
2021-02-19 15:10:28 +01:00
..
api Add tracking for template data presence 2020-12-16 12:50:44 +01:00
TemplateDataBlob.php Merge "More strict validation of InterfaceTexts" 2021-02-13 17:23:44 +00:00
TemplateDataCompressedBlob.php Merge "Add and update soft PHPDoc type hints" 2020-09-21 01:00:27 +00:00
TemplateDataHooks.php Don't validate <templatedata> tags on non-wikitext pages 2021-02-19 15:10:28 +01:00