Skip to content

Prevent cross site scripting#1044

Merged
selul merged 2 commits intodevelopmentfrom
bugfix/1687
Apr 1, 2026
Merged

Prevent cross site scripting#1044
selul merged 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.

@selul selul merged commit d701694 into development Apr 1, 2026
11 of 12 checks passed
@selul selul deleted the bugfix/1687 branch April 1, 2026 07:31
@pirate-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.2.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants