Alain Poirier avatar Alain Poirier committed 2f486bf

Only encode the 'component_to_update' id, not the whole generated js

Comments (0)

Files changed (1)

     body = serializer.serialize(view_to_js.output, content_type, doctype, False)[1]
     # Wrap it into a javascript code
-    js = "%s('%s', %s)" % (view_to_js.js,, py2js(body, view_to_js.renderer))
-    return js.encode('utf-8')
+    return "%s('%s', %s)" % (view_to_js.js,'utf-8'), py2js(body, view_to_js.renderer))
 @peak.rules.when(serializer.serialize, (ViewToJs,))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.