Author: Christian Lopes
Date: 2011-03-11 11:28:21 -0800 (Fri, 11 Mar 2011)
New Revision: 24407
Modified:
cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js
Log:
Fixed bug with "\n" chars in JSON strings sent from ActionScript to JS (see bug
#2493).
Modified: cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js
===================================================================
--- cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js
2011-03-11 19:14:59 UTC (rev 24406)
+++ cytoscapeweb/branches/compound/html-template/js/cytoscapeweb.js
2011-03-11 19:28:21 UTC (rev 24407)
@@ -1843,12 +1843,15 @@
* Do NOT redefine this function!!!
* @ignore
*/
- _dispatch: function (functionName, jsonArg) {
- var arg = null;
- if (jsonArg != null) { arg = JSON.parse(jsonArg); }
- var ret = this[functionName](arg);
- return ret;
- },
+ _dispatch: function (functionName, jsonArg) {
+ var arg = null;
+ if (jsonArg != null) {
+ jsonArg = jsonArg.replace(/\n/g, '\\n');
+ arg = JSON.parse(jsonArg);
+ }
+ var ret = this[functionName](arg);
+ return ret;
+ },
/**
* Just a proxy to hasListener.
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.