1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-18 23:07:45 +02:00

Desktop, Cli: Fixes #3402: Fixed import of checkboxes in ENEX files

This commit is contained in:
Laurent Cozic
2020-06-28 18:55:47 +01:00
parent 05acc51054
commit acf1ff6d1d
2 changed files with 4 additions and 2 deletions

View File

@ -123,7 +123,9 @@ function enexXmlToHtml_(stream, resources) {
section.lines = addResourceTag(section.lines, resource, nodeAttributes);
}
} else if (tagName == 'en-todo') {
section.lines.push('<input type="checkbox" onclick="return false;" />');
const nodeAttributes = attributeToLowerCase(node);
const checkedHtml = nodeAttributes.checked && nodeAttributes.checked.toLowerCase() == 'true' ? ' checked="checked" ' : ' ';
section.lines.push(`<input${checkedHtml}type="checkbox" onclick="return false;" />`);
} else if (isSelfClosingTag(tagName)) {
section.lines.push(`<${tagName}${attributesStr}/>`);
} else {