[bug report] Translator Icon appears for PDF from google books
This is with 3.0b2.r10670
I download the pdf from here:
http://books.google.com/books?id=-WxKAAAAYAAJ&pg=PP1#v=onepage&q&f=false
Saved it, then opened in Firefox using the acrobat plugin. This is where the weirdness happens:
I get a translator icon in the URL bar that says "Save to Zotero (BibTeX)" - I didn't even think that would be possible.
Of course I was curious and tried clicking - which resulted in a seemingly endless stream of empty items being downloaded into Zotero until it froze on an unresponsive script error - I stopped it and Zotero crashed (Zotero error - please restart FF). It also seems like it deleted the collection I was saving into - although that may have happened in my attempts to delete items as they were coming in. Not a problem for me, this is my test profile, but obviously unacceptable for regular usage.
I've never seen this before and I figure it must be quite rare, but if it can be reproduced it'd still be good to fix.
I download the pdf from here:
http://books.google.com/books?id=-WxKAAAAYAAJ&pg=PP1#v=onepage&q&f=false
Saved it, then opened in Firefox using the acrobat plugin. This is where the weirdness happens:
I get a translator icon in the URL bar that says "Save to Zotero (BibTeX)" - I didn't even think that would be possible.
Of course I was curious and tried clicking - which resulted in a seemingly endless stream of empty items being downloaded into Zotero until it froze on an unresponsive script error - I stopped it and Zotero crashed (Zotero error - please restart FF). It also seems like it deleted the collection I was saving into - although that may have happened in my attempts to delete items as they were coming in. Not a problem for me, this is my test profile, but obviously unacceptable for regular usage.
I've never seen this before and I figure it must be quite rare, but if it can be reproduced it'd still be good to fix.
Z.debug(text)
to the beginning of detectImport and doImport so we know what the input "text" is.I tried running
firefox > zoterodebug.txt
but that didn't write anything to the file.
(Also, the error disappears when I add Z.debug(text) to the BibTeX translator and reappears when I remove it)
firefox 2> file
http://books.google.com/books?id=-WxKAAAAYAAJ&pg=PP1#v=onepage&q&f=false
and use Download--> PDF
The issue is that this PDF, and probably many PDFs and binary files in general, contains plenty of sequences like
@k{
, surrounded by other binary data. Zotero takes those to be BibTeX entries.If we can require that at least one @article{, @misc{, etc. is present, we can probably make detection fail 99.9% of the time on these binary inputs.
I'm confused why Zotero is looking in the first place?
If I go on a website with actual BibTeX data, like here:
http://plato.stanford.edu/cgi-bin/encyclopedia/archinfo.cgi?entry=plato
I don't get a translator. So why does it look in a pdf that's opened in FF, but not in a webpage? If anything I'd want/expect the opposite.