Thursday, May 18, 2017

Adobe Reader caused Firefox to crash

We have an object tag on the page and it points to a pdf.

<object data="https://www.somedomain.com./somedocument.pdf">
</object>

Weird scenario is some of us experience Adobe reader unable to open the document and crashed Firefox altogether. After many hours of search, I found out the problem was due to html encoded url. It is supposed to be https://www.somedomain.com/somedocument.pdf#page=1&viewrect=1,2,3,4 but instead it becomes https://www.somedomain.com/somedocument.pdf#page=1&amp;viewrect=1,2,3,4 and Adobe crashed after parsing that the encoded part. Removing the encoding fixed the issue.

No comments:

Post a Comment