fix \ handling

This commit is contained in:
hummypkg 2015-06-15 20:14:16 +00:00
parent cfbd471f7a
commit 0b7de42218
3 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,7 @@
Package: sweeper
Priority: optional
Section: misc
Version: 2.0.8
Version: 2.0.8-2
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif(>=1.2.2-6)

View File

@ -129,7 +129,7 @@ proc ::sweeper::expand {ts str {orig ""}} {
incr pos
set e [string first $ch $ret $pos]
if {$e == -1} {
log "Error. %$fn - $i/$numargs parameters found."
log "Error. %$fn - [llength $fnargs]/$numargs parameters found."
break
}
lappend fnargs [string range $ret \
@ -138,8 +138,10 @@ proc ::sweeper::expand {ts str {orig ""}} {
}
set ret [string replace $ret $i $pos]
log " - Calling expand_$fn\($fnargs)" 2
::sweeper::expand_$fn $ts ret {*}$fnargs
if {[llength $fnargs] == $numargs} {
log " - Calling expand_$fn\($fnargs)" 2
::sweeper::expand_$fn $ts ret {*}$fnargs
}
}
}

View File

@ -46,7 +46,9 @@ proc add_json {str} {
}
proc quot {str} {
return [cgi_quote_html $str]
return [string map {
"\\" "\\\\"
} [cgi_quote_html $str]]
}
set composite {and or}