Index: openacs-4/packages/xotcl-core/xotcl-core.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v diff -u -N -r1.92.2.10 -r1.92.2.11 --- openacs-4/packages/xotcl-core/xotcl-core.info 13 Feb 2016 15:51:30 -0000 1.92.2.10 +++ openacs-4/packages/xotcl-core/xotcl-core.info 15 Mar 2016 10:27:21 -0000 1.92.2.11 @@ -10,7 +10,7 @@ t xotcl - + Gustaf Neumann XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes) 2016-02-13 @@ -48,7 +48,7 @@ BSD-Style 2 - + Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -N -r1.31.2.2 -r1.31.2.3 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 30 Dec 2015 18:09:14 -0000 1.31.2.2 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 15 Mar 2016 10:27:21 -0000 1.31.2.3 @@ -429,10 +429,12 @@ if { [lang::util::translator_mode_p] } { set text [::xo::localize $text 1] } - #my log "--after adp" - return $text + #my log "--after adp $text" + + return [::xo::remove_escapes $text] } - + + #ns_log notice [::xo::Package serialize] } Index: openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl,v diff -u -N -r1.57.2.3 -r1.57.2.4 --- openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 27 Nov 2015 13:10:09 -0000 1.57.2.3 +++ openacs-4/packages/xotcl-core/tcl/30-widget-procs.tcl 15 Mar 2016 10:27:22 -0000 1.57.2.4 @@ -206,6 +206,29 @@ # Localization # + # + # The following pair of functions implement a crude method for + # avoiding i16n substitutions. These are necessary, since xowiki + # provides all its markup finally as "content" that is currently + # internationalized without distinctions. However, sometimes + # (e.g. values in forms) should be presented without i18n + # processing. In such cases, the two functions below can be used to + # prevent such substitutions. + # + proc remove_escapes {text} { + regsub -all \x001# $text "#" text + return $text + } + + proc escape_message_keys {text} { + regsub -all {(\#[a-zA-Z0-9_:-]+\.[a-zA-Z0-9_:-]+)\#} $text "\\1\x001#" text + return $text + } + + # + # xo::localize function + # + set ::xo::acs_lang_url [apm_package_url_from_key acs-lang]admin proc localize {text {inline 0}} { Index: openacs-4/packages/xowiki/xowiki.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v diff -u -N -r1.153.2.10 -r1.153.2.11 --- openacs-4/packages/xowiki/xowiki.info 11 Feb 2016 10:06:37 -0000 1.153.2.10 +++ openacs-4/packages/xowiki/xowiki.info 15 Mar 2016 10:27:22 -0000 1.153.2.11 @@ -10,7 +10,7 @@ t xowiki - + Gustaf Neumann A xotcl-based enterprise wiki system with multiple object types 2015-10-04 @@ -55,7 +55,7 @@ BSD-Style 2 - + @@ -64,7 +64,7 @@ - + Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -N -r1.248.2.16 -r1.248.2.17 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 11 Mar 2016 15:28:01 -0000 1.248.2.16 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 15 Mar 2016 10:27:22 -0000 1.248.2.17 @@ -480,8 +480,9 @@ # If no special renderer is defined, we fall back to this one, # which is in most cases a simple input fied of type string. # + set value [my value] if {[my mode] ne "edit"} { - html::t -disableOutputEscaping [my pretty_value [my value]] + html::t -disableOutputEscaping [my pretty_value $value] return } if {[my exists validate_via_ajax] && [my validator] ne ""} { @@ -497,11 +498,22 @@ set booleanAtts [my booleanAttributes required readonly disabled multiple \ formnovalidate autofocus] - ::html::input [my get_attributes type size maxlength id name value pattern \ - placeholder {CSSclass class} {*}$booleanAtts] {} + # + # We do not want i18n substitutions in the input fields. So, save + # away the orginal value and pass the escaped value to the tdom + # renderer. + # + set old_value [my set value] + my set value [xo::escape_message_keys $old_value] + + ::html::input [my get_attributes type size maxlength id name value \ + pattern placeholder {CSSclass class} {*}$booleanAtts] {} + # + # Reset values to original content + # my resetBooleanAttributes $booleanAtts + my set value $old_value - # # Disabled fieds are not returned by the browsers. For some # fields, we require to be sent. therefore we include in these @@ -511,7 +523,7 @@ # if {[my exists disabled] && [my exists transmit_field_always]} { ::html::div { - ::html::input [list type hidden name [my name] value [my set value]] {} + ::html::input [list type hidden name [my name] value $value] {} } } my set __rendered 1