Skip to content

Prevent cross site scripting#1044

Open
girishpanchal30 wants to merge 2 commits intodevelopmentfrom
bugfix/1687
Open

Prevent cross site scripting#1044
girishpanchal30 wants to merge 2 commits intodevelopmentfrom
bugfix/1687

Conversation

@girishpanchal30
Copy link
Copy Markdown
Contributor

All Submissions:

Changes proposed in this Pull Request:

Escaped the srcset and url.

Closes https://github.com/Codeinwp/optimole-service/issues/1687

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@pirate-bot
Copy link
Copy Markdown
Collaborator

pirate-bot commented Mar 31, 2026

Plugin build for c5045e2 is ready 🛎️!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent XSS vectors in generated <img> tags by escaping dynamically generated srcset entries.

Changes:

  • Escape generated srcset URLs via esc_url().
  • Escape srcset descriptors via esc_attr().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

4 participants