Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Quickadd is executing Templater snippets I have in my note #715

Open
NeighNeighNeigh opened this issue Jul 18, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@NeighNeighNeigh
Copy link

NeighNeighNeigh commented Jul 18, 2024

Describe the bug
I have notes that include Templater (plugin) code snippets I keep for reference. When I use Quickadd (capture mode) to insert content into these notes, the Templater code is executed and the content of the code blocks is deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new note with the following code block (ensure to encapsulate it with triple backticks)
<%*
alert("hello")
%>

It should look like this in your note:
image

  1. Use Quickadd (capture mode) to insert some content into your note.
  2. Notice, the javascript is executed and the contents of the code block is deleted.

Expected behavior
Quickadd will add the content to the note and not execute any existing code blocks within the note.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Safari
  • Version Quickadd 1.10.0

Smartphone (please complete the following information):

  • Device: iPhone12
  • OS: 16.6.1
  • Browser Safari
  • Quickadd 1.10.0
@NeighNeighNeigh NeighNeighNeigh added the bug Something isn't working label Jul 18, 2024
@beesinblenders
Copy link

I notice the same behavior. I don't use the Assistant very often so I'm not sure when this began.

I'll add that when I ask the Assistant for some code, then that code itself gets executed and is removed from the printed output. For example, this prompt:

Please write a templater script that displays an alert with the text "Hello World!". Format it properly, with <%* at the beginning and %> at the end, so I can run it as is.

...will result in the alert popping 2 times, and then something like this in the note:

Here’s the templater script that displays an alert with the text "Hello World!":

```markdown

``` 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants