Steps to reproduce
- Create a new note and go into Editing, Source Mode.
- Add the following two lines of Markdown to the note:
This is <span style="color: red;"><em>a test</em></span> that uses inline HTML.
This is a test that uses HTML character entities—which is also inline HTML.
- Change to Reading view to see what it looks like fully rendered.
- Change back to Editing view and switch to Live Preview
- See the problem – the first line is fully rendered in Live Preview, with the inline HTML applied, but the second line is not rendered … the HTML character entities
and—
are rendered as plain text. I expected to see the second line fully rendered as well.
Live Preview should be rendering HTML character entities. Given that Live Preview does render inline HTML tags, it is unclear why Live Preview would not render HTML character entities (which can also be considered to be inline HTML).
I think that this discrepancy is either an oversight or a bug; it doesn’t feel like an intentional design decision. Hence, this bug report.
Did you follow the troubleshooting guide? Y
I reproduced this problem in the Obsidian Sandbox.
Expected result
In Live Preview mode I expected to see the HTML character entities rendered to the correspond character glyph.
Actual result
I saw the plain text HTML character entity, identitical to what I see in Source mode. The character entity was not rendered.
Environment
SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.4.13
Operating system: Darwin Kernel Version 23.3.0: Wed Dec 20 21:28:58 PST 2023; root:xnu-10002.81.5~7/RELEASE_X86_64 23.3.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
I don’t think screenshots are needed. Let me know if they are needed and I’ll provide them