Fix for bug #0000092: Special chars were not encoded correctly.

git-svn-id: https://develop.svn.wordpress.org/trunk@1436 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
jverber 2004-06-19 02:13:48 +00:00
parent 475e0b9e07
commit 8cf94f6c11
2 changed files with 12 additions and 8 deletions

View File

@ -121,7 +121,7 @@ switch ($action) {
</ul>
<div class="wrap">
<h2>Edit &#8220;<?php echo $row->cat_name?>&#8221; Category </h2>
<h2>Edit &#8220;<?php echo htmlspecialchars($row->cat_name)?>&#8221; Category </h2>
<form name="editcat" method="post">
<input type="hidden" name="action" value="editedcat" />
@ -131,7 +131,7 @@ switch ($action) {
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<tr>
<th width="33%" scope="row"><?php _e('Name:') ?></th>
<td width="67%"><input name="cat_name" type="text" value="<?php echo $row->cat_name?>" size="30" /></td>
<td width="67%"><input name="cat_name" type="text" value="<?php echo htmlspecialchars($row->cat_name)?>" size="30" /></td>
</tr>
<tr>
<th scope="row"><?php _e('Show:') ?></th>
@ -332,7 +332,7 @@ foreach ($results as $row) {
$style = ($i % 2) ? ' class="alternate"' : '';
?>
<tr valign="middle" align="center" <?php echo $style ?> style="border-bottom: 1px dotted #9C9A9C;">
<td><?php echo $row->cat_name?></td>
<td><?php echo htmlspecialchars($row->cat_name)?></td>
<td ><?php echo $row->cat_id?></td>
<td><?php echo $row->auto_toggle?></td>
<td><?php echo $row->show_images?></td>

View File

@ -312,17 +312,17 @@ switch ($action) {
WHERE link_id = $link_id");
if ($row) {
$link_url = $row->link_url;
$link_name = $row->link_name;
$link_url = htmlspecialchars($row->link_url);
$link_name = htmlspecialchars($row->link_name);
$link_image = $row->link_image;
$link_target = $row->link_target;
$link_category = $row->link_category;
$link_description = $row->link_description;
$link_description = htmlspecialchars($row->link_description);
$link_visible = $row->link_visible;
$link_rating = $row->link_rating;
$link_rel = $row->link_rel;
$link_notes = $row->link_notes;
$link_rss_uri = $row->link_rss;
$link_notes = htmlspecialchars($row->link_notes);
$link_rss_uri = htmlspecialchars($row->link_rss);
}
?>
@ -690,6 +690,10 @@ function checkAll(form)
$links = $wpdb->get_results($sql);
if ($links) {
foreach ($links as $link) {
$link->link_name = htmlspecialchars($link->link_name);
$link->link_category = htmlspecialchars($link->link_category);
$link->link_description = htmlspecialchars($link->link_description);
$link->link_url = htmlspecialchars($link->link_url);
$short_url = str_replace('http://', '', $link->link_url);
$short_url = str_replace('www.', '', $short_url);
if ('/' == substr($short_url, -1))