Make WordPress Core


Ignore:
Timestamp:
12/21/2006 10:10:04 AM (19 years ago)
Author:
markjaquith
Message:

new function for escaping within attributes: attribute_escape()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r4583 r4656  
    1414
    1515function wp_ajax_meta_row( $pid, $mid, $key, $value ) {
    16     $value = wp_specialchars($value, true);
     16    $value = attribute_escape($value);
    1717    $key_js = addslashes(wp_specialchars($key, 'double'));
    18     $key = wp_specialchars($key, true);
     18    $key = attribute_escape($key);
    1919    $r .= "<tr id='meta-$mid'><td valign='top'>";
    2020    $r .= "<input name='meta[$mid][key]' tabindex='6' onkeypress='return killSubmit(\"theList.ajaxUpdater(&#039;meta&#039;,&#039;meta-$mid&#039;);\",event);' type='text' size='20' value='$key' />";
     
    142142        $level++;
    143143    }
    144     $cat_full_name = wp_specialchars( $cat_full_name, 1 );
     144    $cat_full_name = attribute_escape( $cat_full_name);
    145145
    146146    $x = new WP_Ajax_Response( array(
Note: See TracChangeset for help on using the changeset viewer.