Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16673/plugins/serendipity_plugin_comments
Modified Files:
Tag: branch_0_6
serendipity_plugin_comments.php
Log Message:
Use Content-Type headers for all pages (including admin area).
Use htmlspecialchars() instead of htmlentities() to not encode native characters.
Index: serendipity_plugin_comments.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php,v
retrieving revision 1.16
retrieving revision 1.16.4.1
diff -u -d -r1.16 -r1.16.4.1
--- serendipity_plugin_comments.php 27 Mar 2004 12:10:23 -0000 1.16
+++ serendipity_plugin_comments.php 7 Apr 2004 12:38:19 -0000 1.16.4.1
@@ -130,9 +130,9 @@
}
if ($row['comment_type'] == 'TRACKBACK' && $row['comment_url'] != '') {
- $user = '<a class="highlight" href="' . strip_tags($row['comment_url']) . '" title="' . htmlentities(strip_tags($row['comment_title'])) . '">' . htmlentities(strip_tags($row['user'])) . '</a>';
+ $user = '<a class="highlight" href="' . strip_tags($row['comment_url']) . '" title="' . htmlspecialchars(strip_tags($row['comment_title'])) . '">' . htmlspecialchars(strip_tags($row['user'])) . '</a>';
} else {
- $user = htmlentities(strip_tags($row['user']));
+ $user = htmlspecialchars(strip_tags($row['user']));
}
$entry = array('comment' => wordwrap($comment, $wordwrap, "\n"));
@@ -142,10 +142,10 @@
PLUGIN_COMMENTS_ABOUT,
$user,
- ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject']) .'#c' . $row['comment_id'] . '" title="' . htmlentities($row['subject']) . '">'
- . htmlentities($row['subject'])
+ ' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject']) .'#c' . $row['comment_id'] . '" title="' . htmlspecialchars($row['subject']) . '">'
+ . htmlspecialchars($row['subject'])
. '</a><br />' . "\n"
- . htmlentities(strftime($dateformat, $row['stamp'])) . '<br />' . "\n"
+ . htmlspecialchars(strftime($dateformat, $row['stamp'])) . '<br />' . "\n"
. $entry['comment']
. '<br /><br /><br />' . "\n\n"
);
|