Index: openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl,v diff -u -r1.25 -r1.26 --- openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 25 Sep 2012 20:50:06 -0000 1.25 +++ openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 9 Apr 2013 12:17:12 -0000 1.26 @@ -565,20 +565,19 @@ # # -gustaf neumann (nov 2010) + if {[ns_info name] eq "NaviServer"} { + my proc urlencode {string} {ns_urlencode $string} + } else { set ue_map [list] - for {set i 0} {$i < 256} {incr i} { - set c [format %c $i] - set x %[format %02x $i] - if {![string match {[-a-zA-Z0-9_.]} $c]} { - lappend ue_map $c $x - } + for {set i 0} {$i < 256} {incr i} { + set c [format %c $i] + set x %[format %02x $i] + if {![string match {[-a-zA-Z0-9_.]} $c]} { + lappend ue_map $c $x + } + } + my proc urlencode {string} {string map [my set ue_map] $string} } - - my proc urlencode {string} { - my instvar ue_map - return [string map $ue_map $string] - } - }