From 0bae4f8c0f8892924b6902d695267e1a1ecc2616 Mon Sep 17 00:00:00 2001 From: dhawes Date: Thu, 27 Jan 2005 01:24:33 +0000 Subject: [PATCH] Moved function from blog/lib to rsslib. unhtmlentities is required to liberate some rss feed information from the clutches of encoding. --- lib/rsslib.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/rsslib.php b/lib/rsslib.php index a45ed58e46..0ba259d4aa 100644 --- a/lib/rsslib.php +++ b/lib/rsslib.php @@ -445,4 +445,16 @@ function rss_get_form($act, $url, $rssid, $printnow=true) { } return $returnstring; } -?> + +/** + * 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); +} +?> \ No newline at end of file -- 2.39.5