Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.

Commit a953b87

Browse files
authored
Merge branch 'main' into LLMO-7445-semantic
2 parents 03b041d + 6c66a85 commit a953b87

7 files changed

Lines changed: 57 additions & 10 deletions

File tree

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/spacecat-shared-data-access/CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [@adobe/spacecat-shared-data-access-v4.30.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v4.29.1...@adobe/spacecat-shared-data-access-v4.30.0) (2026-09-17)
2+
3+
### Features
4+
5+
* **data-access:** rework Site contentAiConfig ([#1917](https://github.com/adobe/spacecat-shared/issues/1917)) ([52981b4](https://github.com/adobe/spacecat-shared/commit/52981b4c136fe743f643ca3b7f9f3cbe02eb0f10)), closes [adobe/spacecat-audit-worker#2951](https://github.com/adobe/spacecat-audit-worker/issues/2951)
6+
17
## [@adobe/spacecat-shared-data-access-v4.29.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v4.29.0...@adobe/spacecat-shared-data-access-v4.29.1) (2026-09-10)
28

39
### Bug Fixes

‎packages/spacecat-shared-data-access/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/spacecat-shared-data-access",
3-
"version": "4.29.1",
3+
"version": "4.30.0",
44
"description": "Shared modules of the Spacecat Services - Data Access",
55
"type": "module",
66
"engines": {

‎packages/spacecat-shared-html-analyzer/CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [@adobe/spacecat-shared-html-analyzer-v1.3.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-html-analyzer-v1.3.5...@adobe/spacecat-shared-html-analyzer-v1.3.6) (2026-09-17)
2+
3+
### Bug Fixes
4+
5+
* **html-analyzer:** tighten cookie-modal selector to prevent body match ([#1935](https://github.com/adobe/spacecat-shared/issues/1935)) ([42f56ac](https://github.com/adobe/spacecat-shared/commit/42f56ac609da477ab81cb69511af66c4acad88a8))
6+
17
## [@adobe/spacecat-shared-html-analyzer-v1.3.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-html-analyzer-v1.3.4...@adobe/spacecat-shared-html-analyzer-v1.3.5) (2026-09-10)
28

39
### Bug Fixes

‎packages/spacecat-shared-html-analyzer/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/spacecat-shared-html-analyzer",
3-
"version": "1.3.5",
3+
"version": "1.3.6",
44
"description": "Analyze HTML content visibility for AI crawlers and citations - compare static HTML vs fully rendered content",
55
"type": "module",
66
"engines": {

‎packages/spacecat-shared-html-analyzer/src/html-filter.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const COOKIE_BANNER_CLASS_SELECTORS = [
5656
'.cookie-notice', '.privacy-notice', '.cookie-policy', '.privacy-policy',
5757
'.cookie-bar', '.privacy-bar', '.consent-bar', '.gdpr-bar',
5858
'.cookie-popup', '.privacy-popup', '.consent-popup', '.gdpr-popup',
59-
'[class*="cookie-modal"]', '.privacy-modal', '.consent-modal', '.gdpr-modal',
59+
'.cookie-modal', '.sl-cookie-modal', '.privacy-modal', '.consent-modal', '.gdpr-modal',
6060
'.cookie-overlay', '.privacy-overlay', '.consent-overlay', '.gdpr-overlay',
6161
'[class*="syrenis-cookie"]',
6262
'.tc-privacy-wrapper',

‎packages/spacecat-shared-html-analyzer/test/index.test.js‎

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,24 @@ describe('HTML Visibility Analyzer', () => {
217217
expect(text).to.not.include('Manage consent preferences');
218218
});
219219

220-
it('should remove custom cookie modal via [class*="cookie-modal"] (e.g. Shangri-La .sl-cookie-modal)', async () => {
220+
it('should remove generic cookie modal (.cookie-modal)', async () => {
221+
const html = `<html><body>
222+
<h1>Welcome</h1>
223+
<p>Main page content.</p>
224+
<div class="cookie-modal">
225+
<div>We use cookies to enhance your experience. Accept all cookies or manage your preferences.</div>
226+
</div>
227+
</body></html>`;
228+
229+
const text = await stripTagsToText(html, true);
230+
231+
expect(text).to.include('Welcome');
232+
expect(text).to.include('Main page content.');
233+
expect(text).to.not.include('We use cookies');
234+
expect(text).to.not.include('Accept all cookies');
235+
});
236+
237+
it('should remove Shangri-La custom cookie modal (.sl-cookie-modal)', async () => {
221238
const html = `<html><body>
222239
<h1>Summer Aqua Pilates</h1>
223240
<p>Experience a refreshing workout in water.</p>
@@ -242,12 +259,30 @@ describe('HTML Visibility Analyzer', () => {
242259
expect(text).to.not.include('Accept All');
243260
});
244261

245-
it('should not remove a [class*="cookie-modal"] element when content does not indicate consent', async () => {
246-
// The substring selector matches the element, but the text-content gate
247-
// must keep it because the copy carries none of the consent keywords.
262+
it('should not strip body when scroll-lock class contains "cookie-modal" substring (Shangri-La regression)', async () => {
263+
// Regression for LLMO-7680: Shangri-La applies sl-cookie-modal-body-hidden to <body>
264+
// while the modal is open. The old substring-based selector matched <body>
265+
// itself, stripping all page content and undercounting client-side words.
266+
const html = `<html><body class="text-font dirltr SHANGRILA sl-header-shangrila sl-cookie-modal-body-hidden">
267+
<h1>Meetings &amp; Events</h1>
268+
<p>Host your event at Boracay Resort.</p>
269+
<div class="sl-cookie-modal">
270+
<div>We use cookies to enhance your experience. Accept all cookies.</div>
271+
</div>
272+
</body></html>`;
273+
274+
const text = await stripTagsToText(html, true);
275+
276+
expect(text).to.include('Meetings');
277+
expect(text).to.include('Host your event at Boracay Resort.');
278+
expect(text).to.not.include('We use cookies to enhance');
279+
expect(text).to.not.include('Accept all cookies');
280+
});
281+
282+
it('should not remove a class-named element when content does not indicate consent', async () => {
248283
const html = `<html><body>
249284
<h1>Summer Sale</h1>
250-
<div class="promo-cookie-modal">Limited time offer on swimwear this weekend.</div>
285+
<div class="cookie-modal">Limited time offer on swimwear this weekend.</div>
251286
<p>Shop the new collection now.</p>
252287
</body></html>`;
253288

0 commit comments

Comments
 (0)