wiki.techinc.nl/tests/phpunit/includes/parser
C. Scott Ananian 82da9cf14b Use Remex for DeduplicateStyles transform
The previous implementation was using an ad-hoc regular expression which
was matching inside the data-mw attribute of Parsoid output, eg:

 <sup about="#mwt42" [...] typeof="mw:Extension/ref mw:Error" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;attrs&quot;:{&quot;name&quot;:&quot;infobox_stats_ref_rail&quot;},&quot;body&quot;:{&quot;html&quot;:&quot;<style data-mw-deduplicate=\&quot;TemplateStyles:r1133582631\&quot; typeof=\&quot;...">

After substitution, the <link> element inserted contained " instead of
&quot; and so broke out of the attribute.

Instead use a proper HTML tokenizer (via wikimedia/remex-html) so that
we don't allow bogus matches inside attribute values.

To fix up tests:
* Don't deduplicate styles when parsing UX messages (also helps performance)
* Don't deduplicate styles in ContentHandler integration tests
* Don't deduplicate styles by default in parser tests
  (unless explicit option is set)

Depends-On: Id9801a9ff540bd818a32bc6fa35c48a9cff12d3a
Depends-On: I5111f1fdb7140948b82113adbc774af286174ab3
Followup-To: Ic0b17e361bf6eb0e71c498abc17f5f67f82318f8
Change-Id: I32d3d1772243c3819e1e1486351d16871b6e21c4
2023-12-15 17:49:21 +01:00
..
CacheTimeTest.php Reorg: Move MWTimestamp to MediaWiki\Utils 2023-08-19 05:53:40 +02:00
CoreParserFunctionsTest.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
ExtraParserTest.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
LinkHolderArrayIntegrationTest.php Merge "parser: Make all LinkHolderArray properties private" 2023-04-08 22:28:31 +00:00
MagicVariableTest.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
MagicWordFactoryTest.php Deprecate MagicWordFactory::getSubstIDs 2023-11-13 11:10:24 +01:00
PageBundleJsonTraitTest.php Introduce PageBundleJsonTrait for serialization 2022-05-23 17:54:48 +01:00
ParserCacheSerializationTestCases.php Namespace ParserOutput 2023-12-14 14:57:34 -05:00
ParserCacheTest.php Namespace ParserOutput 2023-12-14 14:57:34 -05:00
ParserMethodsTest.php parser: Move lang/dir and mw-content-ltr to ParserOutput::getText 2023-11-03 19:24:47 -04:00
ParserOptionsTest.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
ParserOutputTest.php Use Remex for DeduplicateStyles transform 2023-12-15 17:49:21 +01:00
ParserPreloadTest.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
ParserTest.php Move user options related classes into its own namespace 2023-11-29 13:27:13 +01:00
PreprocessorTest.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
RevisionOutputCacheTest.php Namespace ParserOutput 2023-12-14 14:57:34 -05:00
SanitizerTest.php Drop Sanitizer::escapeIdReferenceList(), deprecated since 1.36 2023-09-27 22:40:23 +00:00
StripStateTest.php tests: Make some PHPUnit data providers static 2023-03-24 02:53:57 +00:00
TagHooksTest.php Namespace User under \MediaWiki\User 2023-09-19 19:18:16 +00:00
validateParserCacheSerializationTestData.php Namespace ParserOutput 2023-12-14 14:57:34 -05:00