Added by Jarl: wrap long statements with a CSS class, not an inline style

The page's Content Security Policy (style-src 'self') blocked the inline style attribute, so long statements didn't wrap and the browser console reported the violation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adamandClaude Opus 5.5 committed 2026-10-13 09:27:02 +01:00
1 parent b24c730b97
commit ec16de875d
3 files changed
+10 -1

No files matched your search

+6
View File
@@ -38,6 +38,12 @@ All notable changes to Jarl are documented here. The format follows
- Zone commands take a network for a reverse zone: `jarl zone show - Zone commands take a network for a reverse zone: `jarl zone show
10.0.10.0/24`. 10.0.10.0/24`.
### Fixed
- Server options → Added by Jarl: long statements didn't wrap, and the
browser console reported a Content Security Policy violation (an inline
style the page's policy blocks).
### Upgrading ### Upgrading
- The database gets two new versions (12 and 13), applied when jarld - The database gets two new versions (12 and 13), applied when jarld
+1 -1
View File
@@ -182,7 +182,7 @@ function generatedPanel(el, list) {
h("thead", null, h("tr", null, h("th", null, "Where"), h("th", null, "Statement"), h("th", null, "Why"), h("th", null, "Controlled by"))), h("thead", null, h("tr", null, h("th", null, "Where"), h("th", null, "Statement"), h("th", null, "Why"), h("th", null, "Controlled by"))),
h("tbody", null, list.map((g) => h("tr", null, h("tbody", null, list.map((g) => h("tr", null,
h("td", { class: "small" }, g.where), h("td", { class: "small" }, g.where),
h("td", null, h("pre", { class: "code optval", style: "white-space: pre-wrap; word-break: break-all" }, g.text)), h("td", null, h("pre", { class: "code optval wrap" }, g.text)),
h("td", { class: "small" }, g.why), h("td", { class: "small" }, g.why),
h("td", { class: "small mono" }, g.setting)))))))); h("td", { class: "small mono" }, g.setting))))))));
} }
+3
View File
@@ -567,3 +567,6 @@ ul.probes > li .msg { margin: 6px 0 0; }
table.compare td.compare-cell { vertical-align: top; } table.compare td.compare-cell { vertical-align: top; }
table.compare td.compare-cell button { margin-top: 4px; } table.compare td.compare-cell button { margin-top: 4px; }
table.compare tr.muted td { color: var(--muted); } table.compare tr.muted td { color: var(--muted); }
/* Text that wraps anywhere, e.g. long statements in the Added by Jarl table. */
pre.wrap { white-space: pre-wrap; word-break: break-all; }