Make WordPress Core


Ignore:
Timestamp:
12/17/2018 09:58:12 PM (6 years ago)
Author:
desrosj
Message:

Block Editor: Update @wordpress package dependencies.

Updates the following packages:

block-library, block-serialization-default-parser, block-serialization-spec-parser, blocks, edit-post, editor, format-library.

Merges [43955] to trunk.

Props youknowriad.

Fixes #45145.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/class-wp-block-parser.php

    r44266 r44281  
    365365     * @internal
    366366     * @since 3.8.0
     367     * @since 4.6.1 fixed a bug in attribute parsing which caused catastrophic backtracking on invalid block comments
    367368     * @return array
    368369     */
     
    379380         */
    380381        $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',
    382383            $this->document,
    383384            $matches,
     
    385386            $this->offset
    386387        );
     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        }
    387393
    388394        // we have no more tokens
Note: See TracChangeset for help on using the changeset viewer.