Make WordPress Core


Ignore:
Timestamp:
07/08/2008 11:38:53 PM (18 years ago)
Author:
ryan
Message:

Fix quotes in captions. Props azaozz. see #6812

File:
1 edited

Legend:

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

    r8073 r8290  
    11251125        if ( empty($text) ) return apply_filters('richedit_pre', '');
    11261126
    1127         $output = $text;
    1128         $output = convert_chars($output);
     1127        $output = convert_chars($text);
    11291128        $output = wpautop($output);
    1130 
    1131         // These must be double-escaped or planets will collide.
    1132         $output = str_replace('<', '<', $output);
    1133         $output = str_replace('>', '>', $output);
    1134 
    1135         // These should be entities too
    1136         $output = str_replace('<', '&lt;', $output);
    1137         $output = str_replace('>', '&gt;', $output);
    1138        
     1129        $output = htmlspecialchars($output, ENT_NOQUOTES);
     1130
    11391131        return apply_filters('richedit_pre', $output);
    11401132}
Note: See TracChangeset for help on using the changeset viewer.