Changeset 44281 for trunk/src/wp-includes/class-wp-block-parser.php
- Timestamp:
- 12/17/2018 09:58:12 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43955
- Property svn:mergeinfo changed
-
trunk/src/wp-includes/class-wp-block-parser.php
r44266 r44281 365 365 * @internal 366 366 * @since 3.8.0 367 * @since 4.6.1 fixed a bug in attribute parsing which caused catastrophic backtracking on invalid block comments 367 368 * @return array 368 369 */ … … 379 380 */ 380 381 $has_match = preg_match( 381 '/<!--\s+(?<closer>\/)?wp:(?<namespace>[a-z][a-z0-9_-]*\/)?(?<name>[a-z][a-z0-9_-]*)\s+(?<attrs>{(?: [^}]+|}+(?=})|(?!}\s+-->).)*?}\s+)?(?<void>\/)?-->/s',382 '/<!--\s+(?<closer>\/)?wp:(?<namespace>[a-z][a-z0-9_-]*\/)?(?<name>[a-z][a-z0-9_-]*)\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*+)?}\s+)?(?<void>\/)?-->/s', 382 383 $this->document, 383 384 $matches, … … 385 386 $this->offset 386 387 ); 388 389 // if we get here we probably have catastrophic backtracking or out-of-memory in the PCRE 390 if ( false === $has_match ) { 391 return array( 'no-more-tokens', null, null, null, null ); 392 } 387 393 388 394 // we have no more tokens
Note: See TracChangeset
for help on using the changeset viewer.