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

DOP-5126: Sanitize input for SoftwareSourceCode structured data #1292

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

rayangler
Copy link
Collaborator

@rayangler rayangler commented Oct 23, 2024

Stories/Links:

DOP-5126

Current Behavior:

Staging Links:

Notes:

  • Code input that had </script> was being parsed as the closing tag of the script used for structured data. The fix was to sanitize the input by escaping the characters.

README updates

    • This PR introduces changes that should be reflected in the README, and I have made those updates.
    • This PR does not introduce changes that should be reflected in the README

Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for mongodb-snooty ready!

Name Link
🔨 Latest commit 91e9996
🔍 Latest deploy log https://app.netlify.com/sites/mongodb-snooty/deploys/671fb01fbee54d0009d38e54
😎 Deploy Preview https://deploy-preview-1292--mongodb-snooty.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rayangler rayangler marked this pull request as ready for review October 23, 2024 19:41
Copy link
Collaborator

@seungpark seungpark left a comment

Choose a reason for hiding this comment

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

LGTM.

"@context": "https://schema.org",
"@type": "SoftwareSourceCode",
"codeSampleType": "code snippet",
"text": " &lt;script&gt;&lt;/script&gt; &lt;script&gt; const app = new Realm.App({ id: "&lt;your_realm_app_id&gt;", }); // Callback used in \`data-callback\` to handle Google's response and log user into App Services function handleCredentialsResponse(response) { const credentials = Realm.Credentials.google({ idToken: response.credential }); app .logIn(credentials) .then((user) =&gt; alert(\`Logged in with id: user.id\`)); } &lt;/script&gt;",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice. at least we captured the output 👍

Copy link
Collaborator

@mmeigs mmeigs left a comment

Choose a reason for hiding this comment

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

Great!

@rayangler rayangler merged commit aa37b02 into main Oct 28, 2024
6 checks passed
@rayangler rayangler deleted the DOP-5126-sd-bad-sequence branch October 28, 2024 16:02
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