Make WordPress Core


Ignore:
Timestamp:
11/30/2018 08:57:02 PM (6 years ago)
Author:
youknowriad
Message:

Block Editor: Update @wordpress package dependencies.

Updated packages

  • @wordpress/block-library@2.2.9
  • @wordpress/block-serialization-default-parser@2.0.1
  • @wordpress/block-serialization-spec-parser@2.0.1
  • @wordpress/blocks@6.0.3
  • @wordpress/edit-post@3.1.4
  • @wordpress/editor@9.0.4
  • @wordpress/format-library@1.2.7

Other changes:

  • Backport the parser changes.

Fixes #45145.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/class-wp-block-parser.php

    r43884 r43955  
    360360     * @internal
    361361     * @since 3.8.0
     362     * @since 4.6.1 fixed a bug in attribute parsing which caused catastrophic backtracking on invalid block comments
    362363     * @return array
    363364     */
     
    374375         */
    375376        $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',
    377378            $this->document,
    378379            $matches,
     
    380381            $this->offset
    381382        );
     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        }
    382388
    383389        // we have no more tokens
Note: See TracChangeset for help on using the changeset viewer.