mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
new function for escaping within attributes: attribute_escape()
git-svn-id: https://develop.svn.wordpress.org/trunk@4656 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -13,9 +13,9 @@ function get_out_now() { exit; }
|
||||
add_action( 'shutdown', 'get_out_now', -1 );
|
||||
|
||||
function wp_ajax_meta_row( $pid, $mid, $key, $value ) {
|
||||
$value = wp_specialchars($value, true);
|
||||
$value = attribute_escape($value);
|
||||
$key_js = addslashes(wp_specialchars($key, 'double'));
|
||||
$key = wp_specialchars($key, true);
|
||||
$key = attribute_escape($key);
|
||||
$r .= "<tr id='meta-$mid'><td valign='top'>";
|
||||
$r .= "<input name='meta[$mid][key]' tabindex='6' onkeypress='return killSubmit(\"theList.ajaxUpdater('meta','meta-$mid');\",event);' type='text' size='20' value='$key' />";
|
||||
$r .= "</td><td><textarea name='meta[$mid][value]' tabindex='6' rows='2' cols='30'>$value</textarea></td><td align='center'>";
|
||||
@@ -141,7 +141,7 @@ case 'add-cat' : // From Manage->Categories
|
||||
$cat_full_name = $_cat->cat_name . ' — ' . $cat_full_name;
|
||||
$level++;
|
||||
}
|
||||
$cat_full_name = wp_specialchars( $cat_full_name, 1 );
|
||||
$cat_full_name = attribute_escape( $cat_full_name);
|
||||
|
||||
$x = new WP_Ajax_Response( array(
|
||||
'what' => 'cat',
|
||||
|
||||
Reference in New Issue
Block a user