Index: openacs-4/packages/acs-lang/www/change-locale-include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/change-locale-include.tcl,v diff -u -r1.17.2.4 -r1.17.2.5 --- openacs-4/packages/acs-lang/www/change-locale-include.tcl 27 May 2016 08:34:18 -0000 1.17.2.4 +++ openacs-4/packages/acs-lang/www/change-locale-include.tcl 16 Aug 2016 14:38:48 -0000 1.17.2.5 @@ -7,6 +7,8 @@ if { ![info exists return_url] || $return_url eq "" } { # Use referer header set return_url [ns_set iget [ns_conn headers] referer] + # In case the referrer URL has a protocol and host remove it + regexp {^[a-z]+://[^/]+(/.+)$} $return_url . return_url } # # Check if the passed in value or the referer is faked