Changeset 43955 for branches/5.0/src/wp-includes/class-wp-block-parser.php
- Timestamp:
- 11/30/2018 08:57:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/class-wp-block-parser.php
r43884 r43955 360 360 * @internal 361 361 * @since 3.8.0 362 * @since 4.6.1 fixed a bug in attribute parsing which caused catastrophic backtracking on invalid block comments 362 363 * @return array 363 364 */ … … 374 375 */ 375 376 $has_match = preg_match( 376 '/<!--\s+(?<closer>\/)?wp:(?<namespace>[a-z][a-z0-9_-]*\/)?(?<name>[a-z][a-z0-9_-]*)\s+(?<attrs>{(?: [^}]+|}+(?=})|(?!}\s+-->).)*?}\s+)?(?<void>\/)?-->/s',377 '/<!--\s+(?<closer>\/)?wp:(?<namespace>[a-z][a-z0-9_-]*\/)?(?<name>[a-z][a-z0-9_-]*)\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*+)?}\s+)?(?<void>\/)?-->/s', 377 378 $this->document, 378 379 $matches, … … 380 381 $this->offset 381 382 ); 383 384 // if we get here we probably have catastrophic backtracking or out-of-memory in the PCRE 385 if ( false === $has_match ) { 386 return array( 'no-more-tokens', null, null, null, null ); 387 } 382 388 383 389 // we have no more tokens
Note: See TracChangeset
for help on using the changeset viewer.