Commit 0a19f13a authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Eval javascript returned by rendered artefacts

parent 7c9e7891
......@@ -502,6 +502,9 @@ function template_render($template, $mode, $data=array()) {
d.addCallbacks(
function (response) {
real_target.innerHTML = response.data;
forEach(getElementsByTagAndClassName('script', null, real_target), function(script) {
eval(script.innerHTML);
});
if(format == 'listself') {
appendChildNodes(real_target, A({ href: '', onclick: 'removeListItem(this); return false;' }, '[x]'));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment