wporg-main-2022 icon indicating copy to clipboard operation
wporg-main-2022 copied to clipboard

When creating translated patterns/templates, use esc_attr_e() for attributes

Open dd32 opened this issue 1 year ago • 0 comments

Replaces a TODO in the code with replacing attributes with an escaped variant.

This isn't the cleanest way to achieve the result, but it is the smallest possible code change.

It might look like href should have esc_url( __( .. ) ) but that complicates it with minimal benefit.

Draft as I don't have time to follow up on it completely right now. Feel free to take over.

How to test the changes in this Pull Request:

  1. yarn build:patterns
  2. Test.

dd32 avatar Feb 22 '24 02:02 dd32