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

html links in keymap description can lead Agent astray #2335

Closed
mhantsch opened this issue Aug 12, 2024 · 6 comments · Fixed by #2352
Closed

html links in keymap description can lead Agent astray #2335

mhantsch opened this issue Aug 12, 2024 · 6 comments · Fixed by #2352

Comments

@mhantsch
Copy link

Add some funky html in the keymap description:

image

See that it looks awesome:

image

Click on the github link, and watch Agent turn into a new web page:

image

No way to get back to Agent 😏 You have to close the window and restart Agent.

You could filter out all html content, but it's kind of nice that I can do tables and bold emphasis etc...

@mhantsch
Copy link
Author

And yes, of course I can add target="_blank" to the link and it will open in a new window and leave Agent intact.

@mondalaci
Copy link
Member

Thanks for the report! From a security standpoint, I think Agent should escape all HTML.

@mhantsch
Copy link
Author

From a security standpoint, I think Agent should escape all HTML.

There goes my table... 😔😉

Unfortunately, I agree to the security reasoning.

@ert78gb
Copy link
Member

ert78gb commented Oct 7, 2024

The #2352 PR sanitize the full HTML content but I maybe would better UX to define which HTML elements are allowed and open URLs in the external browser. But do it in other issue if there is user need.

@mondalaci
Copy link
Member

mondalaci commented Oct 7, 2024

Let's allow the use of newlines instead of converting them to <br>

@mhantsch
Copy link
Author

mhantsch commented Oct 8, 2024

snif

image

Can confirm this is now working as intended. Table, emphasis and links are now gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants