Eval script elemtents in HTML body response
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
b9bcc819bd
commit
93994b1320
|
@ -32,6 +32,13 @@ $(document).ready(function(){
|
||||||
var body = $('body');
|
var body = $('body');
|
||||||
$('head').remove();
|
$('head').remove();
|
||||||
body.html(data);
|
body.html(data);
|
||||||
|
|
||||||
|
// Eval the script elements in the response
|
||||||
|
var dom = $(data);
|
||||||
|
dom.filter('script').each(function() {
|
||||||
|
eval(this.text || this.textContent || this.innerHTML || '');
|
||||||
|
});
|
||||||
|
|
||||||
body.removeAttr('id');
|
body.removeAttr('id');
|
||||||
body.attr('id', 'body-settings');
|
body.attr('id', 'body-settings');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue