Replies: 1 comment
-
Any news of that ? Will it be available in v5.0 ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue
When creating a dashboard and using Markdown to create a hyperlink (
<a>
), thetarget
attribute is stripped, even if explicitly included in the raw Markdown input. This prevents the ability to usetarget="_blank"
to open links in a new tab, which is a common use case in dashboards.Upon reviewing the source code, the issue seems to originate from the following function. The
target
attribute for<a>
tags is not currently included in thesafe_markdown_attrs
, causing it to be stripped during the sanitization process.Proposed Solution
Add the
target
attribute to the allowed attributes for<a>
tags in thesafe_markdown_attrs
:Additionally, consider enforcing the use of
rel="noopener noreferrer"
for security purposes whentarget="_blank"
is used.Beta Was this translation helpful? Give feedback.
All reactions