Make WordPress Core


Ignore:
Timestamp:
07/21/2008 12:32:43 AM (18 years ago)
Author:
azaozz
Message:

Prevent adjacent hyphens in a HTML/XML comment. Fixes #6642 for trunk. Props schiller.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/kses.php

    r7969 r8382  
    432432                if ( $string == '' )
    433433                        return '';
     434                // prevent multiple dashes in comments
     435                $string = preg_replace('/--+/', '-', $string);
     436                // prevent three dashes closing a comment
     437                $string = preg_replace('/-$/', '', $string);
    434438                return "<!--{$string}-->";
    435439        }
Note: See TracChangeset for help on using the changeset viewer.