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

Rt 360 #67

Merged
merged 4 commits into from
Jan 10, 2025
Merged

Rt 360 #67

merged 4 commits into from
Jan 10, 2025

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 ?

@@ -494,6 +494,15 @@ export const toRedactor = (jsonValue: any,options?:IJsonToHtmlOptions) : string
}
figureStyles.fieldsEdited.push(figureStyles.caption)
}
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.

2 participants