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:
Mark Jaquith
2006-12-21 10:10:04 +00:00
parent 48ee537a1c
commit 31c39f948d
37 changed files with 126 additions and 123 deletions

View File

@@ -7,7 +7,7 @@ wp_enqueue_script( 'admin-comments' );
require_once('admin-header.php');
if (empty($_GET['mode'])) $mode = 'view';
else $mode = wp_specialchars($_GET['mode'], 1);
else $mode = attribute_escape($_GET['mode']);
?>
<script type="text/javascript">
@@ -42,7 +42,7 @@ function getNumChecked(form)
<form name="searchform" action="" method="get" id="editcomments">
<fieldset>
<legend><?php _e('Show Comments That Contain...') ?></legend>
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo wp_specialchars($_GET['s'], 1); ?>" size="17" />
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" />
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
<?php _e('(Searches within comment text, e-mail, URL, and IP address.)') ?>