Author: nbelaevski
Date: 2007-06-26 06:05:39 -0400 (Tue, 26 Jun 2007)
New Revision: 1316
Modified:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
Log:
Handling for non-string parameters added
Modified:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js
===================================================================
---
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js 2007-06-26
10:04:34 UTC (rev 1315)
+++
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/json/json-dom.js 2007-06-26
10:05:39 UTC (rev 1316)
@@ -111,11 +111,19 @@
// Escape XML symbols - < > & ' ...
xmlescape : function(text){
+ var t = text;
+ if (t) {
+ //handle non-strings
+ t = t.toString();
+ } else {
+ t = "";
+ }
+
for( var i in this._symbols ){
// text = text.replace(i,this._symbols[i]);
- text = text.split(i).join(this._symbols[i])
+ t = t.split(i).join(this._symbols[i])
}
- return text;
+ return t;
},
// Escape JavaScript function
Show replies by date