[unstrip_tags] Apply to sidebar comment display.
Needs serendipity_plugin_comments 1.17 or newer. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
9a7127bf5f
commit
5c75ef4f30
|
@ -2,3 +2,5 @@
|
|||
----
|
||||
|
||||
* Unstrip (escape) HTML tags in comment RSS feeds, too.
|
||||
* And do the same for comments displayed in
|
||||
serendipity_plugin_comments (1.17 and newer).
|
||||
|
|
|
@ -48,6 +48,8 @@ class serendipity_event_unstrip_tags extends serendipity_event
|
|||
|
||||
if (isset($eventData ['comment']) && !empty($eventData['body'])) {
|
||||
$eventData['comment'] = (function_exists('serendipity_specialchars') ? serendipity_specialchars($eventData['body']) : htmlspecialchars($eventData['body'], ENT_COMPAT, LANG_CHARSET));
|
||||
} elseif (isset($addData['from']) && $addData['from'] == 'serendipity_plugin_comments:generate_content' && !empty($eventData ['comment'])) {
|
||||
$eventData['comment'] = (function_exists('serendipity_specialchars') ? serendipity_specialchars($eventData['comment']) : htmlspecialchars($eventData['comment'], ENT_COMPAT, LANG_CHARSET));
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue