mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Add escaping to attributes
This commit is contained in:
parent
64bd0a2da8
commit
7672f66bcf
2 changed files with 10 additions and 15 deletions
|
@ -24,9 +24,9 @@ class PayLaterWCBlocksRenderer {
|
|||
* @param ContainerInterface $c
|
||||
* @return string|void
|
||||
*/
|
||||
public function render( array $attributes, string $location, ContainerInterface $c ) {
|
||||
public function render( array $attributes, string $location, ContainerInterface $c ) {
|
||||
if ( PayLaterWCBlocksModule::is_placement_enabled( $c->get( 'wcgateway.settings.status' ), $location ) ) {
|
||||
return '<div id="' . htmlspecialchars($attributes['id'] ?? '') . '" class="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
||||
return '<div id="' . esc_attr( $attributes['id'] ?? '' ) . '" class="ppcp-messages" data-partner-attribution-id="Woo_PPCP"></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue