Changeset 3417

Show
Ignore:
Timestamp:
01/09/06 23:49:56 (3 years ago)
Author:
ryan
Message:

Pass comments through kses. Props tsimmons. fixes #2130 #2167

Files:

Legend:

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

    r2963 r3417  
    7878############################################################################### 
    7979{ 
    80     return preg_replace('%(<'.# EITHER: < 
     80    return preg_replace('%(<!--.*?-->)|(<'.# EITHER: < 
    8181    '[^>]*'.# things that aren't > 
    8282    '(>|$)'.# > or end of string 
     
    9898        return '&gt;'; 
    9999    # It matched a ">" character 
     100 
     101    if (preg_match('%^<!--.*-->$%', $string)) 
     102        return $string; 
     103    # Allow HTML comments 
    100104 
    101105    if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>?$%', $string, $matches))