Mercurial > hg > egg-tcls
comparison urllog.tcl @ 115:5db02af76016
urllog: Improve entity conversion.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 13 Oct 2011 20:11:02 +0300 |
parents | 593874678e45 |
children | 4f3edcf72987 |
comparison
equal
deleted
inserted
replaced
114:593874678e45 | 115:5db02af76016 |
---|---|
252 } | 252 } |
253 | 253 |
254 | 254 |
255 proc urllog_convert_ent {udata} { | 255 proc urllog_convert_ent {udata} { |
256 global urllog_html_ent | 256 global urllog_html_ent |
257 regsub -all "\r|\n" $udata " " utmp | 257 return [string map -nocase $urllog_html_ent [string map $urllog_html_ent $udata]] |
258 regsub -all " *" $utmp " " utmp | |
259 regsub -all "\t" $utmp "" utmp | |
260 return [string map -nocase $urllog_html_ent [string map $urllog_html_ent $utmp]] | |
261 } | 258 } |
262 | 259 |
263 | 260 |
264 proc urllog_escape { str } { | 261 proc urllog_escape { str } { |
265 return [string map {' ''} $str] | 262 return [string map {' ''} $str] |