Skip to content

refactor: Use script.text instead of innerHTML in injectScript #1764

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ion1
Copy link

@ion1 ion1 commented Jun 19, 2025

Overview

script.innerHTML seems to act like script.text and not do anything unsafe with special characters, but it seems more appropriate to use text.

Manual Testing

Any injectScript invocation in MV2 mode will hit the code path. I have tested it in Firefox.

Related Issue

N/A

`script.innerHTML` seems to act like `text` and not do anything unsafe
with special characters, but it seems more appropriate to use `text`.
@ion1 ion1 requested review from aklinker1 and Timeraa as code owners June 19, 2025 17:19
Copy link

netlify bot commented Jun 19, 2025

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 8f220bc
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6854469f9fcd0600086493b9
😎 Deploy Preview https://deploy-preview-1764--creative-fairy-df92c4.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 project configuration.

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.

1 participant