Index: openacs-4/packages/acs-tcl/acs-tcl.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/acs-tcl.info,v diff -u -r1.70.2.20 -r1.70.2.21 --- openacs-4/packages/acs-tcl/acs-tcl.info 13 Sep 2016 08:23:29 -0000 1.70.2.20 +++ openacs-4/packages/acs-tcl/acs-tcl.info 25 Nov 2016 14:47:44 -0000 1.70.2.21 @@ -9,7 +9,7 @@ f t - + OpenACS The Kernel Tcl API library. 2016-05-15 @@ -18,7 +18,7 @@ GPL version 2 3 - + Index: openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl,v diff -u -r1.67.2.14 -r1.67.2.15 --- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 25 Nov 2016 13:03:16 -0000 1.67.2.14 +++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 25 Nov 2016 14:47:44 -0000 1.67.2.15 @@ -165,7 +165,7 @@ } ad_proc -public ad_html_qualify_links { - -package_url + -path html } { @@ -175,6 +175,7 @@ 1) prepend paths starting with a "/" by the protocol and host. 2) prepend paths not starting a "/" by the package_url, in case it was passed in. + links, which are already fully qualified are not modified. } { set host "[string trimright [ad_url] /]/" @@ -190,12 +191,14 @@ {(href|src)\s*=\s*[\"]((http|https|ftp|mailto):[^'\"]+)[\"]} $html \ "\\1=\"\u0001\\2\u0002\"" html - if {[info exists package_url]} { - set host "[string trimright $package_url /]/" - set html [regsub -all {(href|src)=['\"]([^/][^\u0001:'\"]+?)['\"]} $html "\\1='${host}${package_url}\\2'"] + if {[info exists path]} { + set path "[string trim $path /]/" + regsub -all {(href|src)\s*=\s*['\"]([^/][^\u0001:'\"]+?)['\"]} $html \ + "\\1='${host}${path}\\2111'" html } - set html [regsub -all {(href|src)=['\"](/[^\u0001:'\"]+?)['\"]} $html "\\1=\"${host}\\2\""] - + regsub -all {(href|src)\s*=\s*['\"]/([^\u0001:'\"]+?)['\"]} $html \ + "\\1=\"${host}\\2222\"" html + # # Remove all protection characters again. #