Skip to content

Commit

Permalink
Sync # 321 with release 8.9 (#48352)
Browse files Browse the repository at this point in the history
* Use DOM API to create Order Attribution inputs

* Add changelog entry

* Update changelog entry and release date
  • Loading branch information
rodelgc committed Jun 11, 2024
1 parent a10dc5c commit 0e98883
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,16 @@
* but it's not yet supported in Safari.
*/
connectedCallback() {
let inputs = '';
this.innerHTML = '';
const inputs = new DocumentFragment();
for( const fieldName of this._fieldNames ) {
const value = stringifyFalsyInputValue( this.values[ fieldName ] );
inputs += `<input type="hidden" name="${params.prefix}${fieldName}" value="${value}"/>`;
const input = document.createElement( 'input' );
input.type = 'hidden';
input.name = `${params.prefix}${fieldName}`;
input.value = stringifyFalsyInputValue( ( this.values && this.values[ fieldName ] ) || '' );
inputs.appendChild( input );
}
this.innerHTML = inputs;
this.appendChild( inputs );
}

/**
Expand Down
4 changes: 2 additions & 2 deletions plugins/woocommerce/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ WooCommerce comes with some sample data you can use to see how products look; im

== Changelog ==

= 8.9.3 2024-06-11 =
= 8.9.3 2024-06-10 =

**WooCommerce**

* Security - Prevent HTML & JS injection attacks on registration and checkout forms when the Order Attribution is enabled. [#48348](https://github.com/woocommerce/woocommerce/pull/48348)

[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/changelog.txt).
/trunk/changelog.txt).

0 comments on commit 0e98883

Please sign in to comment.