WordPress.org

Make WordPress Core

Ticket #9270: 9270.2.diff

File 9270.2.diff, 678 bytes (added by Denis-de-Bernardy, 6 years ago)
  • wp-includes/formatting.php

     
    892892 * @return string Balanced text. 
    893893 */ 
    894894function force_balance_tags( $text ) { 
     895        // allow for 1 < 2 and 2 > 1 
     896        $text = str_replace(array(" > ", " < "), array(" &gt; ", "&lt;"), $text); 
     897         
    895898        $tagstack = array(); $stacksize = 0; $tagqueue = ''; $newtext = ''; 
    896899        $single_tags = array('br', 'hr', 'img', 'input'); //Known single-entity/self-closing tags 
    897900        $nestable_tags = array('blockquote', 'div', 'span'); //Tags that can be immediately nested within themselves