@@ -21,9 +21,10 @@ define([
2121 "dijit/_TemplatedMixin" ,
2222 "dojo/_base/array" ,
2323 "dojo/_base/lang" ,
24+ "dojo/html" ,
2425 "mxui/dom" ,
2526 "dojo/text!CustomString/widget/template/CustomString.html"
26- ] , function ( declare , _WidgetBase , _TemplatedMixin , dojoArray , dojoLang , dom , widgetTemplate ) {
27+ ] , function ( declare , _WidgetBase , _TemplatedMixin , dojoArray , dojoLang , html , dom , widgetTemplate ) {
2728 "use strict" ;
2829
2930 // Declare widget's prototype.
@@ -102,6 +103,9 @@ define([
102103 guids : [ this . _contextObj . getGuid ( ) ]
103104
104105 } ,
106+ store : {
107+ caller : this . mxform
108+ } ,
105109 callback : dojoLang . hitch ( this , this . _processSourceMFCallback , callback ) ,
106110 error : dojoLang . hitch ( this , function ( error ) {
107111 alert ( error . description ) ;
@@ -117,13 +121,14 @@ define([
117121
118122 _processSourceMFCallback : function ( callback , returnedString ) {
119123 logger . debug ( this . id + "._processSourceMFCallback" ) ;
120- this . customString . innerHTML = this . checkString ( returnedString , this . renderHTML ) ;
124+ html . set ( this . customString , this . checkString ( returnedString , this . renderHTML ) ) ;
121125 mendix . lang . nullExec ( callback ) ;
122126 } ,
123127
124128 checkString : function ( string , htmlBool ) {
125129 logger . debug ( this . id + ".checkString" ) ;
126130 if ( string . indexOf ( "<script" ) > - 1 || ! htmlBool ) {
131+ logger . debug ( this . id + ".checkString escape String" ) ;
127132 string = dom . escapeString ( string ) ;
128133 }
129134 return string ;
0 commit comments