page content is undefined in loadPage #5331

bittlelum opened this Issue Nov 26, 2012 · 2 comments

2 participants


There's a line in the success function in loadPage where a page div is created if no data-role="page/dialog" is found in the returned HTML:

//if page elem couldn't be found, create one and insert the body element's contents
if ( !page.length ) {
page = $( "

" + html.split( /<\/?body[^>]*>/gmi )[1] + "
" );


It's indexing the result of the split by 1, but I think it's supposed to be indexed as 0 (index 1 gives undefined--unless the content occurs after a </body> tag). The result is that the new page displays as the text "undefined" and nothing else. I may be missing something, but it looks like a bug.

jQuery Foundation member

@bittlelum can you please provide a simplified test case showing the problem and what browser / os you are seeing this on. please see our contributing guidelines.

jQuery Foundation member

since there is no response to request for a test page im going to close this for now if a test page can be provided we will re open

@arschmitz arschmitz closed this Dec 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment