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
remove duplicate data and fix abstract for Hindawi; #972
Conversation
…item to a better one. (The actual data doesn't change apart from the improved abstract, so you can ignore the test changes)
@@ -49,6 +49,11 @@ function detectWeb(doc,url) { | |||
return false; | |||
} | |||
|
|||
function decodeEntities(doc, encodedString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aurimasv -- I know you're super busy, but if you could take 2mins to look at this? Seems like this should be save because we're in a sandbox, but still want to be sure. Couldn't find a method of converting the html entitites without this, but maybe overlooking something simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ZU.unescapeHTML should do what you want
How come we are changing the test then? |
} | ||
} | ||
} | ||
item.abstractNote=abstract; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: space around =
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, might as well move all the abstract
code here.
I changed tests because I wanted a better test case, so I switched them out. |
OK, should be all good now. |
item.extra = ""; | ||
//remove duplicate metadata | ||
for (var i in item){ | ||
if (typeof item[i] == "string" && item[i].match(/^.+,/)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the .match
part necessary? More curious than anything, since I can't think of a reason why it should be.
Looks good. Feel free to merge. |
(this was still an issue, so merging) |
* remove duplicate data and fix abstract for Hindawi; Also switch test item to a better one. (The actual data doesn't change apart from the improved abstract, so you can ignore the test changes)
* remove duplicate data and fix abstract for Hindawi; Also switch test item to a better one. (The actual data doesn't change apart from the improved abstract, so you can ignore the test changes)
Also switch test item to a better one.
(The actual data doesn't change apart from the improved abstract, so you can ignore the test changes)