wiki.techinc.nl/includes/parser
C. Scott Ananian 330ef61cbe Parser::extractBody: Use possessive matcher and once-only subpattern
We were getting PREG_BACKTRACK_LIMIT_ERROR in production from certain
inputs to Parser::extractBody().  Use possessive matchers and a
once-only subpattern to ensure that we don't backtrack unnecessarily
once a <body> tag is found.

Bug: T399064
Follows-Up: I59abad3a58ccd6edc6517b13a56d8253ba0e0928
Change-Id: If6860ca268236cf428d574f6bb21c2070f5aa6a3
(cherry picked from commit 2c56237235a5603a1757982f02d3e542bdafaf06)
2025-07-17 12:56:52 +00:00
..
Hook Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
Parsoid Merge "Deprecate ::setMetrics() calls with StatsdDataFactoryInterface" 2024-10-21 17:12:19 +00:00
BlockLevelPass.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
CacheTime.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
CoreMagicVariables.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
CoreParserFunctions.php Drop PHP 7.4/8.0 support from master (forward-port from MW 1.42) 2025-06-18 10:53:22 +01:00
CoreTagHooks.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
DateFormatter.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
DateFormatterFactory.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
LinkHolderArray.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
MagicWord.php MagicWord::replace*: Make sure we don't pass null into preg_match/preg_replace 2025-03-17 14:19:01 +00:00
MagicWordArray.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
MagicWordFactory.php parser: Add a new {{USERLANGUAGE}} magic word for use in wikitext 2024-09-07 19:16:32 +00:00
MWTidy.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
Parser.php Parser::extractBody: Use possessive matcher and once-only subpattern 2025-07-17 12:56:52 +00:00
ParserCache.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
ParserCacheFactory.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
ParserCacheFilter.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
ParserCacheMetadata.php
ParserFactory.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
ParserObserver.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
ParserOptions.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
ParserOutput.php ParserOutput::getExternalLinks(): Deprecate use of the internal array reference 2024-10-22 16:33:27 -04:00
ParserOutputFlags.php Add ParserOptions::setCollapsibleSections() 2024-04-29 12:11:09 -04:00
ParserOutputLinkTypes.php ParserOutput: Introduce ParserOutput::getLinkList() 2024-10-18 13:24:10 -04:00
ParserOutputStringSets.php
PPCustomFrame_Hash.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPDPart_Hash.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPDStack_Hash.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPDStackElement_Hash.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPFrame.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPFrame_Hash.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPNode.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPNode_Hash_Array.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPNode_Hash_Attr.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPNode_Hash_Text.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPNode_Hash_Tree.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
PPTemplateFrame_Hash.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
Preprocessor.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
Preprocessor_Hash.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
RemexRemoveTagHandler.php
RemexStripTagHandler.php parser: Add missing documentation to class properties 2024-09-07 22:46:08 +02:00
RevisionOutputCache.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
Sanitizer.php SECURITY: Ensure emitted HTML is safe against Unicode NFC normalization 2025-04-10 15:56:06 +01:00
StripState.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00