WordPress.org

Make WordPress Core

Changeset 8383


Ignore:
Timestamp:
07/21/2008 12:47:08 AM (10 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/wp-includes/kses.php

    r7969 r8383  
    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.