use tags instead of attributes for configOptions and displayOptions

This commit is contained in:
Simon Kornblith 2011-04-01 21:07:51 +00:00
parent e87c236c47
commit 6703679d9f

View File

@ -1437,7 +1437,10 @@ Zotero.Schema = new function(){
for each(var attr in ["configOptions", "displayOptions"]) {
try {
metadata[attr] = JSON.parse(xmlnode.getAttribute(attr));
var tags = xmlnode.getElementsByTagName(attr);
if(tags.length && tags[0].firstChild) {
metadata[attr] = JSON.parse(tags[0].firstChild.nodeValue);
}
} catch(e) {
Zotero.logError("Invalid JSON for "+attr+" in new version of "+metadata.label+" ("+translatorID+") from repository");
return;