Fix invalid HTML in note from Quick Copy
A <body> was included with the note element outside of it.
This commit is contained in:
parent
4838726b87
commit
4ac35ecda3
2 changed files with 20 additions and 7 deletions
|
@ -73,6 +73,17 @@ describe("Zotero.QuickCopy", function() {
|
|||
assert.isTrue(worked);
|
||||
assert.isTrue(content.trim().startsWith('@'));
|
||||
});
|
||||
|
||||
it("should copy note content", async function () {
|
||||
var item = await createDataObject('item', { itemType: 'note', note: '<p>Foo</p>' });
|
||||
|
||||
var format = 'bibliography=http://www.zotero.org/styles/apa';
|
||||
Zotero.Prefs.set(prefName, format);
|
||||
|
||||
var content = Zotero.QuickCopy.getContentFromItems([item], format);
|
||||
assert.propertyVal(content, 'text', 'Foo');
|
||||
assert.propertyVal(content, 'html', '<div class=\"zotero-notes\"><div class=\"zotero-note\"><p>Foo</p></div></div>');
|
||||
});
|
||||
});
|
||||
|
||||
it("should generate bibliography in default locale if Quick Copy locale not set", async function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue