Folder add broken for Google Book searches

When I do a search in Google Books and click the folder icon to add the books, the formatting is broken, and instead of getting nice text, I get entries which consist of the check box next to the following data:

if(window['_OC_registerHover']){_OC_registerHover("title":"....","bib_key":"...")}

The "..." fields are liberally sprinkled with escape characters. This makes identifying the listed books not too easy.

Incidentally, there was no way I could select and copy the above text, which made reporting this a bit tedious.

The number Zotero gave me is 823252544 but I didn't see anything I could tell to be relevant in the log.
  • edited June 20, 2009
    Google Books has received an update, so I kinda expected something to break. So if you find any other problems with the translator, please post it to this thread.

    I did come up with a fix. Changing:
    for(var i in items) {
    items[i] = items[i].replace(/- Page [0-9]+\s*$/, "");
    }
    into for(var i in items) {
    items[i] = items[i].replace(/- Page [0-9]+\s*$/, "");
    try{items[i] = items[i].match(/"title":"([^"]+)"/)[1];} catch(e) {}
    }
    should do the trick.

    It doesn't nicely unescape some HTML characters (e.g. test http://books.google.com/books?q=subject:"+Science+/+Chemistry+/+General+"&lr=&as_brr=3&sa=N&start=40), and Zotero.Utilities.unescapeHTML(str) doesn't work in this case. If you're in a hurry, you can try to make the change yourself. Otherwise, you can wait until someone from the Zotero team applies this patch.
Sign In or Register to comment.