Skip to content

Commit 0e7e45c

Browse files
Fix issue with URL pattern of banned terms when the moderate preloading script is enabled
1 parent 6bcf4a0 commit 0e7e45c

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,31 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1515

1616
### Fixed
1717

18+
## [0.9.3] - 2025-10-07
19+
20+
### Fixed
21+
22+
- Fix regex to detect banned terms correctly when using a moderate preloading script.
23+
- Based on the changes of [!554](https://gitlab.hyva.io/hyva-themes/magento2-theme-module/-/merge_requests/554/diffs) in the Hyva GitLab.
24+
25+
## [0.9.2] - 2025-03-14
26+
27+
### Added
28+
- More detailed description to provide more clarity of banned terms.
29+
30+
### Fixed
31+
- Missing resource in system.xml.
32+
33+
## [0.9.1] - 2025-03-14
34+
35+
### Fixed
36+
- "Incorrectly Nested Style Tag" error.
37+
1838
## [0.9.0] - 2025-03-12
1939

2040
- Release of this project 🎉
2141

2242
[0.9.0]: https://github.com/basecom/magento2-speculation-rules-toolbox/releases/tag/v0.9.0
43+
[0.9.1]: https://github.com/basecom/magento2-speculation-rules-toolbox/releases/tag/v0.9.1
44+
[0.9.2]: https://github.com/basecom/magento2-speculation-rules-toolbox/releases/tag/v0.9.2
45+
[0.9.3]: https://github.com/basecom/magento2-speculation-rules-toolbox/releases/tag/v0.9.3

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "basecom/magento2-speculation-rules-toolbox",
3-
"version": "0.9.2",
3+
"version": "0.9.3",
44
"description": "Magento2 module to provide extensive functionality for speculation rules",
55
"type": "magento2-module",
66
"license": [

view/frontend/templates/js/speculationrules.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ $preloadType = $speculationRules->getSpeculationRulesPreloadType();
162162
"where": {
163163
"and": [
164164
{"href_matches": "/*"},
165-
{"not": {"href_matches": ".*(" + SpeculationRules.bannedTerms + ").*"}},
165+
{"not": {"href_matches": "*/(" + SpeculationRules.bannedTerms + ")/*"}},
166+
{"not": {"href_matches": "/*(" + SpeculationRules.bannedTerms + ")/*"}},
166167
{"not": {"href_matches": "/*\\?*(^|&)add-to-cart=*"}},
167168
{"not": {"selector_matches": ".no-prerender"}},
168169
{"not": {"selector_matches": ".do-not-prerender"}},

0 commit comments

Comments
 (0)