Make WordPress Core

Changeset 3717


Ignore:
Timestamp:
04/19/2006 03:03:27 AM (19 years ago)
Author:
ryan
Message:

Move htmlentities2 to functions-formatting.php. #2525

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r3713 r3717  
    10331033}
    10341034
     1035// Borrowed from the PHP Manual user notes. Convert entities, while
     1036// preserving already-encoded entities:
     1037function htmlentities2($myHTML) {
     1038    $translation_table=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES);
     1039    $translation_table[chr(38)] = '&';
     1040    return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($myHTML, $translation_table));
     1041}
     1042
    10351043?>
  • trunk/wp-includes/functions.php

    r3716 r3717  
    13641364}
    13651365
    1366 // Borrowed from the PHP Manual user notes. Convert entities, while
    1367 // preserving already-encoded entities:
    1368 function htmlentities2($myHTML) {
    1369     $translation_table=get_html_translation_table (HTML_ENTITIES,ENT_QUOTES);
    1370     $translation_table[chr(38)] = '&';
    1371     return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($myHTML, $translation_table));
    1372 }
    1373 
    13741366/*
    13751367add_query_arg: Returns a modified querystring by adding
     
    16711663    return $installed;
    16721664}
     1665
    16731666?>
Note: See TracChangeset for help on using the changeset viewer.