www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit c77c7ca17db892f503b6937855289e5e76b90250
parent 063ba1de5e6776c3c47f1f8210a84c0d09c41f01
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 13 Jan 2012 18:40:02 -0500

Throw error when attempting to install style that isn't XML

Also remove redundant "new XML()" call, which cleanXML() does itself.

Diffstat:
Mchrome/content/zotero/xpcom/style.js | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js @@ -169,7 +169,10 @@ Zotero.Styles = new function() { var xml = enConverter.parse(); } else { // CSL - var xml = new XML(this.cleanXML(style)); + var xml = this.cleanXML(style); + if (!xml.name()) { + throw new Error("File is not XML"); + } } } catch(e) { error = e;