diff --git a/lib/rsslib.php b/lib/rsslib.php index dcc3c419bc2..a132be41f4a 100644 --- a/lib/rsslib.php +++ b/lib/rsslib.php @@ -424,6 +424,18 @@ function rss_print_form($act='none', $url='', $rssid='', $preferredtitle='', $co print rss_get_form($act, $url, $rssid, $preferredtitle, $courseid); } + /** + * Translates HTML special characters back to ASCII + * RSS feeds may have encoded html commands which we want to translate properly + * to display as intended rather than as source (html script visible in feed) + * This function taken from Simplog - www.simplog.net + */ +function rss_unhtmlentities($string) { + $trans_tbl = get_html_translation_table (HTML_ENTITIES); + $trans_tbl = array_flip ($trans_tbl); + return strtr ($string, $trans_tbl); +} + /** * Prints or returns a form for managing rss feed entries.