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

[SER-1602] Security Vulnerabilities and bugs #5370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

John-Weak
Copy link
Contributor

@John-Weak John-Weak commented Jun 26, 2024

  • [star rating] sanitize text and link to prevent xss

@John-Weak John-Weak changed the title sanitize text and links [SER-1602] Security Vulnerabilities and bugs Jun 26, 2024
@John-Weak John-Weak requested review from widatama and a team and removed request for widatama June 26, 2024 09:09
@John-Weak John-Weak closed this Jun 26, 2024
@John-Weak John-Weak reopened this Jun 26, 2024
@John-Weak John-Weak marked this pull request as ready for review June 26, 2024 12:46
link.textValue = $("<p>").text(link.textValue).text();
var regex = new RegExp('\\b' + link.textValue + '\\b', 'g');
finalText = finalText.replace(regex, '<a href="' + link.linkValue + '" target="_blank">' + link.textValue + '</a>');
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 this pull request may close these issues.

None yet

2 participants