Closed sixhours closed 7 hours ago
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the fix/decode-entitles-title
branch.
To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack fix/decode-entitles-title
Interested in more tips and information?
jetpack rsync
command to sync your changes to a WoA dev blog.Thank you for your PR!
When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation :robot:
The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.
Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance!
I'm posing this as a proof of concept because I'm concerned it's not as secure as it could be. I see we're using
decodeEntities
elsewhere in the plugin, so it's probably okay? But I wonder about the potential for XSS issues sneaking through.
Thank you for considering that. Since the text is passed to and rendered by React components, it's safe to decode the HTML entities.
FYI I'm on vacation next week. If this gets approved before I get back, please feel free to merge on my behalf!
Fixes https://github.com/Automattic/jetpack/issues/26760
Proposed changes:
decodeEntities
on post title & description before showing them in the Social Previews panel.I'm posing this as a proof of concept because I'm concerned it's not as secure as it could be. I see we're usingAnswered in comments.decodeEntities
elsewhere in the plugin, so it's probably okay? But I wonder about the potential for XSS issues sneaking through.Before
After
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
&
&
)