Ignore sanitization changes when comparing notes in conflict

Until we have a consistent way of sanitizing HTML on client and server, account
for differences manually. More differences between HTMLPurifier and TinyMCE
should be added as necessary.
This commit is contained in:
Dan Stillman 2016-05-17 02:33:53 -04:00
parent 6f04b34d59
commit d8025be676
2 changed files with 59 additions and 0 deletions

View file

@ -104,6 +104,19 @@ describe("Zotero.DataObjectUtilities", function() {
})
})
describe("notes", function () {
it("should ignore sanitization changes", function* () {
var json1 = {
note: "<p> </p>"
};
var json2 = {
note: "<p>&nbsp;</p>"
};
var changes = Zotero.DataObjectUtilities.diff(json1, json2);
assert.lengthOf(changes, 0);
});
});
//
// Relations
//