1. Alain Poirier
  2. core

Commits

Alain Poirier  committed 2f486bf

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

  • Participants
  • Parent commits f626ca3
  • Branches default

Comments (0)

Files changed (1)

File nagare/ajax.py

View file
  • Ignore whitespace
     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, view_to_js.id, py2js(body, view_to_js.renderer))
-    return js.encode('utf-8')
+    return "%s('%s', %s)" % (view_to_js.js, view_to_js.id.encode('utf-8'), py2js(body, view_to_js.renderer))
 
 
 @peak.rules.when(serializer.serialize, (ViewToJs,))