Skip to content

Commit

Permalink
[unstrip_tags] Apply to sidebar comment display.
Browse files Browse the repository at this point in the history
Needs serendipity_plugin_comments 1.17 or newer.

Signed-off-by: Thomas Hochstein <thh@inter.net>
  • Loading branch information
th-h committed Apr 24, 2020
1 parent 9a7127b commit 5c75ef4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions serendipity_event_unstrip_tags/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ function event_hook($event, &$bag, &$eventData, $addData = null) {

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;
Expand Down

0 comments on commit 5c75ef4

Please sign in to comment.