Make WordPress Core

Changeset 3417


Ignore:
Timestamp:
01/09/2006 11:49:56 PM (19 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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))
Note: See TracChangeset for help on using the changeset viewer.