From 7a011a99c7fd840df6e5a00f42573893586f8790 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 May 2013 01:40:27 -0700 Subject: wrong attribution on likes of comments in email notifications. Let's also call the thing they liked a comment instead of a status --- include/text.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index e1fc0ade5..00e95a2bb 100755 --- a/include/text.php +++ b/include/text.php @@ -81,6 +81,22 @@ function escape_tags($string) { } +function purify_html($s) { + require_once('library/HTMLPurifier.auto.php'); + require_once('include/html2bbcode.php'); + +// FIXME this function has html output, not bbcode - so safely purify these +// $s = html2bb_video($s); +// $s = oembed_html2bbcode($s); + + $config = HTMLPurifier_Config::createDefault(); + $config->set('Cache.DefinitionImpl', null); + + $purifier = new HTMLPurifier($config); + return $purifier->purify($s); +} + + // generate a string that's random, but usually pronounceable. // used to generate initial passwords -- cgit v1.2.3