omnivore-app / obsidian-omnivore

Obsidian plugin to fetch articles and highlights from Omnivore
MIT License
813 stars 46 forks source link

Importing highlights labels escapes slash character #40

Closed dbobak closed 1 year ago

dbobak commented 1 year ago

New feature in 1.1.1 is possibility to import labels of individual higlights (as requested in #22 and #35). But when the label contains slash character (/), it is escaped, which in result makes it wrongly import into Obsidian. The same tags are correctly imported into yaml frontmatter, the problem is only with labels attached to specific highlights in note body:

image

sywhb commented 1 year ago

Hey @dbobak, all variables in the template are HTML-escaped by default. If you want to render unescaped HTML, use the triple mustache: {{{name}}}. You can also use & to unescape a variable.

For instance, to show the slash correctly in the label names, I use this template:

{{#labels}} #{{{name}}} {{/labels}}

As a result, I can get something like this:

Screenshot 2023-04-03 at 6 11 09 PM
dbobak commented 1 year ago

Yes, right! My fault, I forget about it!

Thank you!