Author: Christian Lopes
Date: 2011-03-11 11:14:59 -0800 (Fri, 11 Mar 2011)
New Revision: 24406

Modified:
   cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js
Log:
Fixed bug with "\n" chars in JSON strings sent from ActionScript to JS (see bug 
#2493).

Modified: cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js
===================================================================
--- cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js    
2011-03-11 18:45:06 UTC (rev 24405)
+++ cytoscapeweb/trunk/cytoscapeweb/html-template/js/cytoscapeweb.js    
2011-03-11 19:14:59 UTC (rev 24406)
@@ -1774,7 +1774,10 @@
          */
         _dispatch: function (functionName, jsonArg) {
             var arg = null;
-            if (jsonArg != null) { arg = JSON.parse(jsonArg); }
+            if (jsonArg != null) {
+               jsonArg = jsonArg.replace(/\n/g, '\\n');
+               arg = JSON.parse(jsonArg);
+            }
             var ret = this[functionName](arg);
             return ret;
         },

-- 
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.

Reply via email to