-
Notifications
You must be signed in to change notification settings - Fork 36
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
Conversation
✅ Deploy Preview for mongodb-snooty ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this 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": " <script></script> <script> const app = new Realm.App({ id: "<your_realm_app_id>", }); // 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) => alert(\`Logged in with id: user.id\`)); } </script>", |
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Stories/Links:
DOP-5126
Current Behavior:
Staging Links:
Notes:
</script>
was being parsed as the closing tag of thescript
used for structured data. The fix was to sanitize the input by escaping the characters.README updates