Skip to content

Conversation

@shreya-kamble
Copy link
Contributor

No description provided.

@shreya-kamble shreya-kamble requested a review from a team as a code owner January 9, 2025 05:54
Copy link
Contributor

@Jayesh2812 Jayesh2812 left a comment

Choose a reason for hiding this comment

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

Can we avoid usage of https://www.youtube.com/embed/VD6xJq8NguY links for testing since those will be caught during secret scan ?

}
if (jsonValue['type'] === 'social-embeds') {
const sanitizedHTML = DOMPurify.sanitize(allattrs['src'])
const urlMatch:any = sanitizedHTML.match(/https?:\/\/[^\s"'>]+/);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the avoid usage of any be avoided ?

if (urlMatch && urlMatch[0] !== 'undefined') {
attrsJson['src'] = decodeURIComponent(urlMatch[0])
} else{
attrsJson['src'] = " "
Copy link
Contributor

Choose a reason for hiding this comment

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

We could avoid adding empty space here

Copy link
Contributor

@Jayesh2812 Jayesh2812 left a comment

Choose a reason for hiding this comment

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

Changes look good to me

@shreya-kamble shreya-kamble merged commit 3609671 into development Jan 10, 2025
6 checks passed
@shreya-kamble shreya-kamble deleted the RT-360 branch January 10, 2025 05:58
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.

3 participants