changed ajax response injection to avoid filtering-out script elements that are included in the page div. Fixes #145

This commit is contained in:
scottjehl 2010-10-20 18:32:00 -04:00
parent ebfcc40e39
commit b15b9153a4

View file

@ -275,7 +275,10 @@
$.ajax({
url: fileUrl,
success: function( html ) {
var page = jQuery("<div>" + html + "</div>").find('[data-role="page"]');
var all = jQuery("<div></div>");
//workaround to allow scripts to execute when included in page divs
all.get(0).innerHTML = html;
var page = all.find('[data-role="page"]');
if ( page.attr('id') ) {
page = wrapNewPage( page );