* Introduce a 'safe_text' field that allows a reduced subset of HTML tags.
* Escape on input as well as output; generalize sanitization function.
* Set reasonable default rules.
* Guard against invalid callbacks (escaping/sanitizing) functions.
* Update plugins/woocommerce/src/Internal/Utilities/HtmlSanitizer.php
Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>
* Allow alt (accessibility) for img tags; allow class attributes for img and span tags.
* Allow class attr for p tags.
* Use safe_text for payment gateway titles.
* Make HtmlSanitizer available through Utils service provider.
* Update settings code to pull HtmlSanitizer as a service and to use the new sanitize() method.
* Remove `style` from list of allowed attributes.
Allowing arbitrary CSS rules through style could undo the intent of this change, since that would allow a range of positioning and sizing changes to be effected.
* Remove unusued import.
* If no (KSES) rules are specifed, then strip all tags (this is a safer default strategy).
* For better safety, only apply pre-processor callbacks; remove responsibility for trimming of strings.
Applying callbacks to a string after it ahs passed through wp_kses() could (potentially) undo the work done by that function, and result in unexpected tags in the sanitizer's output.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Peter Fabian <peter.fabian.github@gmail.com>
* Update WooStep to have name in meta
* Add useProductStepChange hook and use it to detect form value changes in product tourkit, added tracking for tour view, tour dismiss, tour complete, and step complete
* Add tour view, tour dismiss, tour completion track to old product walkthrough
* Changelog
* Fix test
* Add listener to publish button for product spotlight tour
* Add track for old walkthrough publish button
* Add update product actions to product data store
* Add changelog entry
* Use MutableProperties for update data
* Omit read only properties instead of picking mutable properties
This replaces all `nx` commands with `turbo` commands and removes Nx from the repository. All of the `project.json` files have been removed and any commands that broke with Turborepo have been adjusted.
This new method is syntactic sugar for array_map. It scans an array
of arrays and/or objects and selects one value from each using
an array key name, an object method, or an object property.
* Add optional usage of database transactions for orders sync.
Includes a new setting in Advanced - Custom data stores to enable
or disable transactions usage and to select the transaction
isolation level.
* Improve the selection of data to be updated when syncing orders.
The SQL query that chooses records to be migrated to core tables
now explicitly excludes unchanged records based on the column mappings.
Also when syncing meta tables with single meta values, records for
which the value hasn't changed are now excluded from the update.
* Fix MetaToCustomTableMigrator to work with order addresses table.
* Add unit tests for db transactions on PostsToOrdersMigrationController
Also add the DynamicDecorator::call_original_method method
* Add product-tour admin script
* Update class-wc-admin-pointers.php to show experimental product tour
* Remove unnecessary window.onload
* Replace add new button with Enable guided mode button for product editing
* Show tour when tutorial query = true
* Add logic to show new tour only when a user select the physical product template
* Update product tour last step button text
* Add auto-scroll effect
* Fix i18n text
* Use bottom-start placement and align the arrow to the left
* Update pnpm-lock.yaml
* Update product tour effects
* Add changelog
* Add doc comments & check for tour-kit
* Add focus elements to product tour and wait initial element for tour showup
* Use spotlight query param to toggle new product tour feature
* Update wait seconds
* Update border style for product description & short description when editor is focused
* Add experimental-product-tour feature flag
* Refactor product-tour and support html editor focus style
Co-authored-by: moon <moon.kyong@automattic.com>
* Add schema
* update to new filepath
* test
* Revert "test"
This reverts commit d05a731a46.
* remove unused import
* add products and orders scanning
* escape slashes
* save
* save
* save
* test
* save
* save
* better descriptions
* moar tests
* Revert "moar tests"
This reverts commit ad552db45b.
* remove test
* better doc blocks
* check port first
* stop wp-env after operation is done
* remove ProductAttributesLookup
* Fix root namespace indicator in parameter
For LookupDataStore::on_product_created_or_updated_via_rest_api.
This was preventing the v1 REST API endpoint for batch insert of
products from working.
Co-authored-by: barryhughes <3594411+barryhughes@users.noreply.github.com>
Add individual analytics leaderboard endpoints
Register routes for each of the individual leaderboards.
These leaderboards can be pretty expensive to generate. If you only need
to data from one of them, it can be a pretty significant performance
boost to avoid generating all the leaderboards.