Mercurial > hg > egg-tcls
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 "-|-|'|'|—|-|‏||—|-|–|--|‪||‬|" -append feeds_ent_str "|‎||å|å|Å|Å|é|é|:|:| | " -append feeds_ent_str "|”|\"|“|\"|«|<<|»|>>|"|\"" -append feeds_ent_str "|ä|ä|ö|ö|Ä|Ä|Ö|Ö|&|&|<|<|>|>" -append feeds_ent_str "|ä|ä|å|ö|—|-|'|'|–|-|"|\"" -append feeds_ent_str "|||-|’|'|ü|ü|Ü|Ü|•|*|€|€" -append feeds_ent_str "|”|\"" -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 {