Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes browsers on a sample file #152

Closed
edtechd opened this issue Jul 24, 2014 · 9 comments
Closed

Crashes browsers on a sample file #152

edtechd opened this issue Jul 24, 2014 · 9 comments

Comments

@edtechd
Copy link

edtechd commented Jul 24, 2014

Hello,

I am trying to open the sample file from Google using epub.js https://code.google.com/p/epub-samples/downloads/detail?name=childrens-literature-20130206.epub and it crashes the browser while loading. I guess that it occurs wihle extracting zip file but maybe in other place.

Thank you.

@edtechd
Copy link
Author

edtechd commented Aug 8, 2014

Any ideas?

@jimski777
Copy link

I Have the same problem. After installing the epub.js I can view the sample epub files in the example but files from google examples, that edtechd is refering to, also crash my browser. I tried opening them in Firefox v.28 and Chrome v.32. Can any of you guys open files from this website:
http://code.google.com/p/epub-samples/

@jimski777
Copy link

I also have the same problem in IE10.

@justmarkup
Copy link

Can confirm the problem in Chrome 37 and tracked down the problem. Seems like parseFromString(text, "application/xml"); is the problem.

Can someone who sees the crash with the sample file from above, load the epub in examples/contained.html and change in build/epub.min.js

b.parseFromString(a,"application/xml")

to

b.parseFromString(a,"text/html")

It fixed the issue for me and I am curious if it also stops crashing for you after this change.

@edtechd
Copy link
Author

edtechd commented Sep 11, 2014

It fixed the issue for me and I am curious if it also stops crashing for you after this change.

Hi Michael! Yes, it solved the issue but if I open the file in Chrome then inner pages of the document do not show, only navigation page with TOC. I cannot go to the inner page when I click on the chapter name. And in Firefox it works well. Can you please check it?

Thank you.

Regards,
Eduard

@justmarkup
Copy link

Hey Eduard,

you are right, I got the same behaviour in Chrome, can you change the following in build/epub.min.js

EPUBJS.core.resolveUrl(e,g),a.onclick=function(){return c.goto(f)

to

EPUBJS.core.resolveUrl(e,g),a.onclick=function(){return c.goto(g)

After that change the links within TOC were clickable again, can you confirm?

@edtechd
Copy link
Author

edtechd commented Sep 12, 2014

Yes, it solved the problem. Thank you very much!

@justmarkup
Copy link

@fchasen Hi Fred, the changes I made for this are justmarkup@767a57a and justmarkup@92095d1

Does anything speak against this change, or can I open a pull request for this?

@fchasen
Copy link
Contributor

fchasen commented Dec 5, 2014

Does "text/xml" crash? I think the mime type needs to include xml, since the document in the epub must by xhtml and we need it to parse as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants