Note disappears after entering in an HTML code block

Steps to reproduce

Create a new note.
Title it Testing
Put in a code block


Paste the following code in the block:

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
    <form action="https://example.com" method="POST">
      <input type="hidden" name="email" value="j1234&#64;test&#46;com" />
      <input type="submit" value="Submit request" />
    </form>
    <script>
      history.pushState('', '', '/');
      document.forms[0].submit();
    </script>
  </body>
</html>

Hit return twice and the note is gone.

### Did you follow the troubleshooting guide? [Y/N]
Yes
<!-- 
Did you try the above steps in the sandbox vault (or just any vault started in restricted mode, no snippets and default theme)?  
It's gonna break our hearts to discard this bug report if you didn't do it! Please!
-->
Yes I tried it in the sandbox vault.

### Expected result
<!--
What do you expect to see after carrying out the steps above?
-->
A note with the data.

### Actual result
<!-- Instead of the expected result, what happened? -->
The note just disappears.

### Environment
<!-- Paste your debug info below, which can be accessed by Command Palette (Ctrl/Cmd-P on Desktop, Swipe down from the top on mobile) enter "Show debug info", and click "Copy to clipboard". -->

SYSTEM INFO:
	Obsidian version: v1.8.4
	Installer version: v1.6.5
	Operating system: Darwin Kernel Version 23.6.0: Wed Jul 31 20:49:39 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6000 23.6.0
	Login status: not logged in
	Language: en
	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

<!--
Anything else you think would help our investigation, like a screenshot or a log file?
You can drag and drop screenshots to this box.
For large amount of text, try putting them into something like Pastebin.
For videos, upload them somewhere and drop a link here.
-->

In the future, please fill out all of the bug report template.

I cannot reproduce on my end. Does the same happen in sandbox mode for you? Sandbox vault - Obsidian Help

Please also paste your Obsidian Debug info in your reply: Help and support - Obsidian Help

1 Like

I can’t see anything odd on my end either. Clip from the v1.8.7 Sandbox:

Obsidian_IGMkPJZxNJ

The debug info is in the code block if you scroll down. I’m assuming this is what you meant?

Hit return twice and the note is gone.

Did you follow the troubleshooting guide? [Y/N]

Yes

Yes I tried it in the sandbox vault.

Expected result

A note with the data.

Actual result

The note just disappears.

Environment

SYSTEM INFO:
Obsidian version: v1.8.4
Installer version: v1.6.5
Operating system: Darwin Kernel Version 23.6.0: Wed Jul 31 20:49:39 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6000 23.6.0
Login status: not logged in
Language: en
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’ve recorded a video of this and it’s actually not even requiring me to hit the return key any longer. I can send you the file, but it won’t let me upload it.

I think it’s your antivirus who is deleting the note.

You are 100% correct. Sorry for troubling you and apologies.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.