Browse files

misc changes

  • Loading branch information...
1 parent ce596ef commit 70366053880eb56b117aad6d2a1fc5aae2d2bf12 @alexkingorg alexkingorg committed Nov 1, 2010
Showing with 11 additions and 7 deletions.
  1. +1 −1 comment/comment-default.php
  2. +1 −1 comment/ping.php
  3. +1 −1 error/exit.php
  4. +3 −1 forms/search.php
  5. +2 −2 posts/search.php
  6. +3 −1 sidebar/sidebar-default.php
View
2 comment/comment-default.php
@@ -49,7 +49,7 @@
echo get_avatar($comment, 25);
}
-echo '<span class="author">',comment_author_link(),'</span> &mdash; <a href="'.htmlspecialchars(get_comment_link( $comment->comment_ID )).'">',comment_date(),' @ ',comment_time(),'</a>';
+echo '<span class="author">',comment_author_link(),'</span> &mdash; <a href="'.esc_url(get_comment_link( $comment->comment_ID )).'">',comment_date(),' @ ',comment_time(),'</a>';
if (function_exists('comment_reply_link') && get_option('thread_comments')) {
echo ' &mdash; ',comment_reply_link(array_merge( $args, array('respond_id' => 'respond-p' . $post->ID, 'depth' => $depth, 'max_depth' => $args['max_depth'])), $comment, $post);
View
2 comment/ping.php
@@ -36,7 +36,7 @@
edit_comment_link(__('Edit', 'carrington-text'), '<span class="comment-editlink">', '</span>');
-echo '<span class="author">',comment_author_link(),'</span> &mdash; <a href="'.htmlspecialchars(get_comment_link( $comment->comment_ID )).'">',comment_date(),' @ ',comment_time(),'</a>';
+echo '<span class="author">',comment_author_link(),'</span> &mdash; <a href="'.esc_url(get_comment_link( $comment->comment_ID )).'">',comment_date(),' @ ',comment_time(),'</a>';
?>
</div>
View
2 error/exit.php
@@ -20,5 +20,5 @@
?>
<html>
-<body><?php echo htmlspecialchars($str); ?></body>
+<body><?php echo esc_html($str); ?></body>
</html>
View
4 forms/search.php
@@ -18,6 +18,8 @@
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
if (CFCT_DEBUG) { cfct_banner(__FILE__); }
+$s = get_query_var('s');
+
if (get_option('permalink_structure') != '') {
$onsubmit = "location.href=this.action+'search/'+encodeURIComponent(this.s.value).replace(/%20/g, '+'); return false;";
}
@@ -28,6 +30,6 @@
?>
<form method="get" action="<?php echo trailingslashit(get_bloginfo('url')); ?>" onsubmit="<?php echo $onsubmit; ?>">
- <input type="text" id="s" name="s" value="<?php echo wp_specialchars($s, 1); ?>" size="15" />
+ <input type="text" id="s" name="s" value="<?php echo esc_attr($s); ?>" size="15" />
<input type="submit" name="submit_button" value="<?php _e('Search', 'carrington-text'); ?>" />
</form>
View
4 posts/search.php
@@ -23,10 +23,10 @@
$s = get_query_var('s');
if (get_option('permalink_structure') != '') {
- $search_title = '<a href="'.trailingslashit(get_bloginfo('url')).'search/'.urlencode($s).'">'.htmlspecialchars($s).'</a>';
+ $search_title = '<a href="'.esc_attr(site_url('search/'.urlencode($s))).'">'.esc_html($s).'</a>';
}
else {
- $search_title = '<a href="'.trailingslashit(get_bloginfo('url')).'?s='.urlencode($s).'">'.htmlspecialchars($s).'</a>';
+ $search_title = '<a href="'.esc_attr(site_url('?s='.urlencode($s))).'">'.esc_html($s).'</a>';
}
?>
View
4 sidebar/sidebar-default.php
@@ -19,9 +19,11 @@
if (CFCT_DEBUG) { cfct_banner(__FILE__); }
?>
-
<div id="sidebar">
<?php
+global $post;
+$orig_post = $post;
+
$about_text = cfct_about_text();
if (!empty($about_text)) {
?>

0 comments on commit 7036605

Please sign in to comment.