WordPress / wporg-main-2022

A block-based child theme for WordPress.org, plus local environment
62 stars 22 forks source link

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

Open dd32 opened 4 months ago

dd32 commented 4 months ago

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.