@holmdigital/engine 3.3.10 → 3.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ROGZGHH6.mjs → chunk-EWVIRZYF.mjs} +1 -1
- package/dist/cli/index.js +10 -10
- package/dist/cli/index.mjs +10 -10
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/cli/index.js
CHANGED
|
@@ -1620,7 +1620,7 @@ function isInterstitialPage(pageTitle, hasMetaRefresh, bodyTextLength) {
|
|
|
1620
1620
|
return false;
|
|
1621
1621
|
}
|
|
1622
1622
|
function getEngineVersion() {
|
|
1623
|
-
return "3.3.
|
|
1623
|
+
return "3.3.11";
|
|
1624
1624
|
}
|
|
1625
1625
|
function getStandardsVersion() {
|
|
1626
1626
|
try {
|
|
@@ -2289,8 +2289,8 @@ function formatDate(dateString) {
|
|
|
2289
2289
|
minute: "2-digit"
|
|
2290
2290
|
});
|
|
2291
2291
|
}
|
|
2292
|
-
function escapeHtml(
|
|
2293
|
-
return
|
|
2292
|
+
function escapeHtml(value) {
|
|
2293
|
+
return String(value).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2294
2294
|
}
|
|
2295
2295
|
function renderNoScriptSection(result) {
|
|
2296
2296
|
const noScript = result.noScript;
|
|
@@ -2337,7 +2337,7 @@ function inconclusiveReportHTML(result) {
|
|
|
2337
2337
|
<head>
|
|
2338
2338
|
<meta charset="utf-8" />
|
|
2339
2339
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
2340
|
-
<title>${t("report.title", { url: result.url })}</title>
|
|
2340
|
+
<title>${t("report.title", { url: escapeHtml(result.url) })}</title>
|
|
2341
2341
|
<style>
|
|
2342
2342
|
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f8fafc; color: #0f172a; margin: 0; padding: 3rem 1.5rem; }
|
|
2343
2343
|
.wrap { max-width: 640px; margin: 0 auto; }
|
|
@@ -2357,7 +2357,7 @@ function inconclusiveReportHTML(result) {
|
|
|
2357
2357
|
<div class="icon">\u26A0\uFE0F</div>
|
|
2358
2358
|
<h1>${t("report.inconclusive_title")}</h1>
|
|
2359
2359
|
<p>${t("report.inconclusive_detail")}</p>
|
|
2360
|
-
<div class="page-title">${t("report.scan_target", { url: result.url })}<br/>${escapeHtml(result.metadata.pageTitle || "N/A")}</div>
|
|
2360
|
+
<div class="page-title">${t("report.scan_target", { url: escapeHtml(result.url) })}<br/>${escapeHtml(result.metadata.pageTitle || "N/A")}</div>
|
|
2361
2361
|
</div>
|
|
2362
2362
|
<div class="footer">${t("report.footer", { version: getEngineVersion() })}</div>
|
|
2363
2363
|
</div>
|
|
@@ -2389,7 +2389,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
2389
2389
|
WCAG ${report.wcagCriteria} \u2022 EN 301 549 ${report.en301549Criteria}
|
|
2390
2390
|
</div>
|
|
2391
2391
|
<div style="font-size: 0.95rem; color: #334155; line-height: 1.5;">
|
|
2392
|
-
${report.holmdigitalInsight.reasoning}
|
|
2392
|
+
${escapeHtml(report.holmdigitalInsight.reasoning)}
|
|
2393
2393
|
</div>
|
|
2394
2394
|
</div>
|
|
2395
2395
|
`).join("")}`;
|
|
@@ -2399,7 +2399,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
2399
2399
|
<head>
|
|
2400
2400
|
<meta charset="UTF-8">
|
|
2401
2401
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
2402
|
-
<title>${t("report.title", { url: result.url })}</title>
|
|
2402
|
+
<title>${t("report.title", { url: escapeHtml(result.url) })}</title>
|
|
2403
2403
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
2404
2404
|
<style>
|
|
2405
2405
|
@page {
|
|
@@ -2569,7 +2569,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
2569
2569
|
<div class="header">
|
|
2570
2570
|
<div class="brand">@HolmDigital/<span>engine</span></div>
|
|
2571
2571
|
<div class="meta">
|
|
2572
|
-
<div>${t("report.scan_target", { url: result.url })}</div>
|
|
2572
|
+
<div>${t("report.scan_target", { url: escapeHtml(result.url) })}</div>
|
|
2573
2573
|
<div>${t("report.generated", { date: formatDate(result.timestamp) })}</div>
|
|
2574
2574
|
${sector ? `<div style="margin-top: 0.25rem; font-size: 0.75rem; font-weight: 600; color: ${sector === "private" ? "#7c3aed" : "#1d4ed8"};">${sector === "private" ? "Private sector (EAA)" : "Public sector (WAD)"}</div>` : ""}
|
|
2575
2575
|
${generateBadgeUrl(result.score) ? `<div style="margin-top: 0.5rem;"><img src="${generateBadgeUrl(result.score)}" alt="Accessibility Status: 100% Compliant" /></div>` : ""}
|
|
@@ -2647,13 +2647,13 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
2647
2647
|
${report.legalContext?.eaaDeadline ? `<br/><strong>\u26A0\uFE0F EAA Deadline:</strong> ${report.legalContext.eaaDeadline}` : ""}
|
|
2648
2648
|
</div>
|
|
2649
2649
|
<div style="font-size: 0.95rem; color: #334155; line-height: 1.5;">
|
|
2650
|
-
${report.holmdigitalInsight.swedishInterpretation}
|
|
2650
|
+
${escapeHtml(report.holmdigitalInsight.swedishInterpretation)}
|
|
2651
2651
|
${report.holmdigitalInsight.priorityRationale ? `<br/><br/><strong>Priority Rationale:</strong> ${report.holmdigitalInsight.priorityRationale}` : ""}
|
|
2652
2652
|
</div>
|
|
2653
2653
|
${report.remediation.component ? `
|
|
2654
2654
|
<div class="remediation-box">
|
|
2655
2655
|
<div class="remediation-title">${t("report.prescriptive_fix")}</div>
|
|
2656
|
-
<div class="remediation-text">${t("report.use")} <strong>${report.remediation.component}</strong>: ${report.remediation.description}</div>
|
|
2656
|
+
<div class="remediation-text">${t("report.use")} <strong>${report.remediation.component}</strong>: ${escapeHtml(report.remediation.description)}</div>
|
|
2657
2657
|
</div>
|
|
2658
2658
|
` : ""}
|
|
2659
2659
|
</div>
|
package/dist/cli/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
generateStatementContent,
|
|
9
9
|
getEngineVersion,
|
|
10
10
|
isBadgeWithheldByRobustness
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-EWVIRZYF.mjs";
|
|
12
12
|
import {
|
|
13
13
|
groupReportsByRule,
|
|
14
14
|
impactBreakdown,
|
|
@@ -63,8 +63,8 @@ function formatDate(dateString) {
|
|
|
63
63
|
minute: "2-digit"
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function escapeHtml(
|
|
67
|
-
return
|
|
66
|
+
function escapeHtml(value) {
|
|
67
|
+
return String(value).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
68
68
|
}
|
|
69
69
|
function renderNoScriptSection(result) {
|
|
70
70
|
const noScript = result.noScript;
|
|
@@ -111,7 +111,7 @@ function inconclusiveReportHTML(result) {
|
|
|
111
111
|
<head>
|
|
112
112
|
<meta charset="utf-8" />
|
|
113
113
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
114
|
-
<title>${t("report.title", { url: result.url })}</title>
|
|
114
|
+
<title>${t("report.title", { url: escapeHtml(result.url) })}</title>
|
|
115
115
|
<style>
|
|
116
116
|
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f8fafc; color: #0f172a; margin: 0; padding: 3rem 1.5rem; }
|
|
117
117
|
.wrap { max-width: 640px; margin: 0 auto; }
|
|
@@ -131,7 +131,7 @@ function inconclusiveReportHTML(result) {
|
|
|
131
131
|
<div class="icon">\u26A0\uFE0F</div>
|
|
132
132
|
<h1>${t("report.inconclusive_title")}</h1>
|
|
133
133
|
<p>${t("report.inconclusive_detail")}</p>
|
|
134
|
-
<div class="page-title">${t("report.scan_target", { url: result.url })}<br/>${escapeHtml(result.metadata.pageTitle || "N/A")}</div>
|
|
134
|
+
<div class="page-title">${t("report.scan_target", { url: escapeHtml(result.url) })}<br/>${escapeHtml(result.metadata.pageTitle || "N/A")}</div>
|
|
135
135
|
</div>
|
|
136
136
|
<div class="footer">${t("report.footer", { version: getEngineVersion() })}</div>
|
|
137
137
|
</div>
|
|
@@ -163,7 +163,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
163
163
|
WCAG ${report.wcagCriteria} \u2022 EN 301 549 ${report.en301549Criteria}
|
|
164
164
|
</div>
|
|
165
165
|
<div style="font-size: 0.95rem; color: #334155; line-height: 1.5;">
|
|
166
|
-
${report.holmdigitalInsight.reasoning}
|
|
166
|
+
${escapeHtml(report.holmdigitalInsight.reasoning)}
|
|
167
167
|
</div>
|
|
168
168
|
</div>
|
|
169
169
|
`).join("")}`;
|
|
@@ -173,7 +173,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
173
173
|
<head>
|
|
174
174
|
<meta charset="UTF-8">
|
|
175
175
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
176
|
-
<title>${t("report.title", { url: result.url })}</title>
|
|
176
|
+
<title>${t("report.title", { url: escapeHtml(result.url) })}</title>
|
|
177
177
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
178
178
|
<style>
|
|
179
179
|
@page {
|
|
@@ -343,7 +343,7 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
343
343
|
<div class="header">
|
|
344
344
|
<div class="brand">@HolmDigital/<span>engine</span></div>
|
|
345
345
|
<div class="meta">
|
|
346
|
-
<div>${t("report.scan_target", { url: result.url })}</div>
|
|
346
|
+
<div>${t("report.scan_target", { url: escapeHtml(result.url) })}</div>
|
|
347
347
|
<div>${t("report.generated", { date: formatDate(result.timestamp) })}</div>
|
|
348
348
|
${sector ? `<div style="margin-top: 0.25rem; font-size: 0.75rem; font-weight: 600; color: ${sector === "private" ? "#7c3aed" : "#1d4ed8"};">${sector === "private" ? "Private sector (EAA)" : "Public sector (WAD)"}</div>` : ""}
|
|
349
349
|
${generateBadgeUrl(result.score) ? `<div style="margin-top: 0.5rem;"><img src="${generateBadgeUrl(result.score)}" alt="Accessibility Status: 100% Compliant" /></div>` : ""}
|
|
@@ -421,13 +421,13 @@ function generateReportHTML(result, sector = "public", audience = "developer", p
|
|
|
421
421
|
${report.legalContext?.eaaDeadline ? `<br/><strong>\u26A0\uFE0F EAA Deadline:</strong> ${report.legalContext.eaaDeadline}` : ""}
|
|
422
422
|
</div>
|
|
423
423
|
<div style="font-size: 0.95rem; color: #334155; line-height: 1.5;">
|
|
424
|
-
${report.holmdigitalInsight.swedishInterpretation}
|
|
424
|
+
${escapeHtml(report.holmdigitalInsight.swedishInterpretation)}
|
|
425
425
|
${report.holmdigitalInsight.priorityRationale ? `<br/><br/><strong>Priority Rationale:</strong> ${report.holmdigitalInsight.priorityRationale}` : ""}
|
|
426
426
|
</div>
|
|
427
427
|
${report.remediation.component ? `
|
|
428
428
|
<div class="remediation-box">
|
|
429
429
|
<div class="remediation-title">${t("report.prescriptive_fix")}</div>
|
|
430
|
-
<div class="remediation-text">${t("report.use")} <strong>${report.remediation.component}</strong>: ${report.remediation.description}</div>
|
|
430
|
+
<div class="remediation-text">${t("report.use")} <strong>${report.remediation.component}</strong>: ${escapeHtml(report.remediation.description)}</div>
|
|
431
431
|
</div>
|
|
432
432
|
` : ""}
|
|
433
433
|
</div>
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holmdigital/engine",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@types/cosmiconfig": "^6.0.3",
|
|
103
|
-
"@types/node": "^26.
|
|
103
|
+
"@types/node": "^26.5.1",
|
|
104
104
|
"@types/react": "^19.2.18",
|
|
105
105
|
"@types/react-dom": "^19.2.7",
|
|
106
106
|
"@types/ws": "^8.5.13",
|