changeset 292:9f90d6918626

feeds: Also use the html entity conversion from utillib here.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Jan 2015 14:02:43 +0200
parents 54d34d086b47
children 42ba48d54324
files fetch_feeds.tcl
diffstat 1 files changed, 1 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/fetch_feeds.tcl	Mon Jan 26 14:01:07 2015 +0200
+++ b/fetch_feeds.tcl	Mon Jan 26 14:02:43 2015 +0200
@@ -21,15 +21,6 @@
 
 ##############################################################################
 
-set    feeds_ent_str "&#45;|-|&#39;|'|—|-|&rlm;||&#8212;|-|&#8211;|--|&#x202a;||&#x202c;|"
-append feeds_ent_str "|&lrm;||&aring;|å|&Aring;|Å|&eacute;|é|&#58;|:|&nbsp;| "
-append feeds_ent_str "|&#8221;|\"|&#8220;|\"|&laquo;|<<|&raquo;|>>|&quot;|\""
-append feeds_ent_str "|&auml;|ä|&ouml;|ö|&Auml;|Ä|&Ouml;|Ö|&amp;|&|&lt;|<|&gt;|>"
-append feeds_ent_str "|&#228;|ä|&#229;|ö|&mdash;|-|&#039;|'|&ndash;|-|&#034;|\""
-append feeds_ent_str "|&#124;|-|&#8217;|'|&uuml;|ü|&Uuml;|Ü|&bull;|*|&euro;|€"
-append feeds_ent_str "|&rdquo;|\""
-set html_ent [split [encoding convertfrom "utf-8" $feeds_ent_str] "|"]
-
 package require http
 
 if {[info exists http_user_agent] && $http_user_agent != ""} {
@@ -50,14 +41,9 @@
 
 ##############################################################################
 
-proc convert_ent {udata} {
-  global html_ent
-  return [string map -nocase $html_ent [string map $html_ent $udata]]
-}
-
 proc add_entry {uname uprefix uurl utitle} {
   global currclock feeds_db nitems
-  set utmp [convert_ent $uurl]
+  set utmp [utl_convert_html_ent $uurl]
   if {[string match "http://*" $utmp] || [string match "https://*" $utmp]} {
     set utest "$utmp"
   } else {