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:
parent
6f04b34d59
commit
d8025be676
2 changed files with 59 additions and 0 deletions
|
@ -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> </p>"
|
||||
};
|
||||
var changes = Zotero.DataObjectUtilities.diff(json1, json2);
|
||||
assert.lengthOf(changes, 0);
|
||||
});
|
||||
});
|
||||
|
||||
//
|
||||
// Relations
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue