Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with DOMParser for html in tests #74

Closed
zuphilip opened this issue Feb 25, 2018 · 2 comments
Closed

Error with DOMParser for html in tests #74

zuphilip opened this issue Feb 25, 2018 · 2 comments

Comments

@zuphilip
Copy link
Collaborator

There seems to be an error in Scaffold tests when using DOMParser for html, e.g.

		var parser = new DOMParser();
		var html = parser.parseFromString(text, "text/html");

As it is also used in DAI-Zenon translator. The first test case there for https://zenon.dainst.org/Record/000269027 results now in the following error

12:11:38 Translation using DAI-Zenon failed: 
         string => Error: error parsing XML
         stack => Zotero.Translate.SandboxManager/this.sandbox.DOMParser/wrappedObj.parseFromString@chrome://zotero/content/xpcom/translation/translate_firefox.js:387:33
         scrape/<@DAI-Zenon:80:13
         Zotero.Utilities.Translate.prototype.doGet/xmlhttp<@chrome://zotero/content/xpcom/utilities_translate.js:330:5
         _stateChange@chrome://zotero/content/xpcom/http.js:1047:6
         Zotero.HTTP</this.doGet/xmlhttp.onreadystatechange@chrome://zotero/content/xpcom/http.js:400:4
         
         url => https://zenon.dainst.org/Record/000269027
         downloadAssociatedFiles => true
         automaticSnapshots => true

However, the same url works fine when loaded in the browser tab. @dstillman Any idea how to fix this?

@zuphilip
Copy link
Collaborator Author

zuphilip commented Mar 3, 2018

@dstillman This error is getting quite annoying because I cannot easily do testing e.g. in ScienceDirect translator which also relies on DOMParser. Maybe also something in Zotero itself changed?

@dstillman
Copy link
Member

Moved to zotero/zotero#1502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants