X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ftidy%2FBalancer.php;h=b0c12e4c2068686155316cd991e2b8036179e85d;hb=7ad35afab2a7d6a289097d6a23b2e00c1728c45a;hp=8da15535b951ffa36b7f35e168457798fd050203;hpb=1310fabe6e679fd6c8cabb06956cb8d614e5f2eb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/tidy/Balancer.php b/includes/tidy/Balancer.php index 8da15535b9..b0c12e4c20 100644 --- a/includes/tidy/Balancer.php +++ b/includes/tidy/Balancer.php @@ -1824,7 +1824,7 @@ class Balancer { * Regex borrowed from Tim Starling's "remex-html" project. */ const VALID_COMMENT_REGEX = "~ !-- - ( # 1. Comment match detector + ( # 1. Comment match detector > | -> | # Invalid short close ( # 2. Comment contents (?: @@ -1839,15 +1839,15 @@ class Balancer { ( # 3. Comment close --> | # Normal close --!> | # Comment end bang - ( # 4. Indicate matches requiring EOF - --! | # EOF in comment end bang state - -- | # EOF in comment end state - - | # EOF in comment end dash state - # EOF in comment state + ( # 4. Indicate matches requiring EOF + --! | # EOF in comment end bang state + -- | # EOF in comment end state + - | # EOF in comment end dash state + (?#nothing) # EOF in comment state ) ) ) - ([^<]*) \z # 5. Non-tag text after the comment + ([^<]*) \z # 5. Non-tag text after the comment ~xs"; /** @@ -1891,7 +1891,7 @@ class Balancer { $bad = array_uintersect_assoc( $this->allowedHtmlElements, BalanceSets::$unsupportedSet[BalanceSets::HTML_NAMESPACE], - function( $a, $b ) { + function ( $a, $b ) { // Ignore the values (just intersect the keys) by saying // all values are equal to each other. return 0;