This repository was archived by the owner on Aug 18, 2026. It is now read-only.
fix: Remove scripts and styles - #282
Merged
leogermani merged 1 commit intoSep 24, 2025
Merged
Conversation
leogermani
approved these changes
Sep 24, 2025
matticbot
pushed a commit
that referenced
this pull request
Sep 25, 2025
# [2.7.0-alpha.1](v2.6.2...v2.7.0-alpha.1) (2025-09-25) ### Bug Fixes * indentation ([dbc2b49](dbc2b49)) * removing scripts and styles ([#282](#282)) ([aa2b33d](aa2b33d)) * update download URL for db.php ([#280](#280)) ([5f42bd1](5f42bd1)) ### Features * add filters for tracking markup snippets ([cffecb0](cffecb0))
Contributor
|
🎉 This PR is included in version 2.7.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
matticbot
pushed a commit
that referenced
this pull request
Oct 6, 2025
# [2.7.0](v2.6.2...v2.7.0) (2025-10-06) ### Bug Fixes * indentation ([dbc2b49](dbc2b49)) * removing scripts and styles ([#282](#282)) ([aa2b33d](aa2b33d)) * update download URL for db.php ([#280](#280)) ([5f42bd1](5f42bd1)) ### Features * add filters for tracking markup snippets ([cffecb0](cffecb0))
Contributor
|
🎉 This PR is included in version 2.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
adekbadek
pushed a commit
to Automattic/newspack-workspace
that referenced
this pull request
Apr 27, 2026
# [2.7.0-alpha.1](Automattic/republication-tracker-tool@v2.6.2...v2.7.0-alpha.1) (2025-09-25) ### Bug Fixes * indentation ([61e77a6](Automattic/republication-tracker-tool@61e77a6)) * removing scripts and styles ([#282](Automattic/republication-tracker-tool#282)) ([3fd7b05](Automattic/republication-tracker-tool@3fd7b05)) * update download URL for db.php ([#280](Automattic/republication-tracker-tool#280)) ([4c5860e](Automattic/republication-tracker-tool@4c5860e)) ### Features * add filters for tracking markup snippets ([052345d](Automattic/republication-tracker-tool@052345d))
adekbadek
pushed a commit
to Automattic/newspack-workspace
that referenced
this pull request
Apr 27, 2026
# [2.7.0](Automattic/republication-tracker-tool@v2.6.2...v2.7.0) (2025-10-06) ### Bug Fixes * indentation ([61e77a6](Automattic/republication-tracker-tool@61e77a6)) * removing scripts and styles ([#282](Automattic/republication-tracker-tool#282)) ([3fd7b05](Automattic/republication-tracker-tool@3fd7b05)) * update download URL for db.php ([#280](Automattic/republication-tracker-tool#280)) ([4c5860e](Automattic/republication-tracker-tool@4c5860e)) ### Features * add filters for tracking markup snippets ([052345d](Automattic/republication-tracker-tool@052345d))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request:
Closes https://linear.app/a8c/issue/NPMIG-1709/rtt-remove-javascript-code-from-text-only-version .
This PR adds code to remove <script> and <style> tags along with their content before wp_kses processing.
The issue occurred because wp_kses strips HTML tags but leaves their content, causing JavaScript code and CSS to appear as plain text in the republished content. This fix removes the tags and their content entirely before the wp_kses filtering step.
How to test the changes in this Pull Request: