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

Linkify can parse anchor tag #596

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sukunis
Copy link
Member

@sukunis sukunis commented Nov 12, 2024

To shorten links that are added in comments: linkify accepts anchor tag input.

Tested with test link

grafik

Result:
grafik

Susanne Kunis added 2 commits November 7, 2024 16:17
…t to the correct html representation.

Because input seems to escaped only the character < and > the regex expression is specific for such a input.
Comment on lines +75 to +77
input= input.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&amp;/g, '&')

Check failure

Code scanning / CodeQL

Double escaping or unescaping High

This replacement may produce '&' characters that are double-unescaped
here
.
@knabar
Copy link
Member

knabar commented Nov 13, 2024

At first glance this would allow linkifying <a> tags with javascript: hrefs and possibly other undesired links. At a minimum the href property would have to be checked against the usual linkify regex, but that might not be sufficient.

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

Successfully merging this pull request may close these issues.

3 participants