Get our slashes straight.

git-svn-id: https://develop.svn.wordpress.org/trunk@1405 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2004-06-11 08:02:40 +00:00
parent 39541ea299
commit a5a67ec795
6 changed files with 14 additions and 18 deletions

View File

@@ -267,7 +267,6 @@ function balanceTags($text, $is_comment = 0) {
function format_to_edit($content) {
$content = stripslashes($content);
$content = apply_filters('format_to_edit', $content);
$content = htmlspecialchars($content);
return $content;

View File

@@ -21,9 +21,9 @@ function comments_template() {
if ( $single || $withcomments ) :
$req = get_settings('require_name_email');
$comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
$comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
$comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
$comment_author = isset($_COOKIE['comment_author_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_'.$cookiehash])) : '';
$comment_author_email = isset($_COOKIE['comment_author_email_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_email_'.$cookiehash])) : '';
$comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_url_'.$cookiehash])) : '';
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
include(ABSPATH . 'wp-comments.php');
endif;

View File

@@ -102,7 +102,7 @@ function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_
$output = '';
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
if (stripslashes($_COOKIE['wp-postpass_'.$cookiehash]) != $post->post_password) { // and it doesn't match the cookie
$output = get_the_password_form();
return $output;
}
@@ -178,7 +178,7 @@ function get_the_excerpt($fakeit = true) {
global $id, $post;
global $cookiehash;
$output = '';
$output = stripslashes($post->post_excerpt);
$output = $post->post_excerpt;
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
$output = __('There is no excerpt because this is a protected post.');
@@ -188,7 +188,7 @@ function get_the_excerpt($fakeit = true) {
// If we haven't got an excerpt, make one in the style of the rss ones
if (($output == '') && $fakeit) {
$output = $post->post_content;
$output = stripslashes($post->post_content);
$output = strip_tags($output);
$blah = explode(' ', $output);
$excerpt_length = 120;