Commit 3e44309
fix(preview): allow interactive SVG objects through CSP frame-src
Asciidoctor renders image::foo.svg[opts=interactive] as
<object type="image/svg+xml" data="..."> rather than <img>. The preview's
Content-Security-Policy allow-listed object-src for it but not frame-src —
Chromium (the webview's engine) gates an <object> that navigates to an
SVG/HTML document, opening a nested browsing context, by frame-src (falling
back through child-src to default-src 'none' when unset), not object-src
alone, so the SVG silently failed to load with nothing shown. frame-src now
mirrors object-src's allow-list, including the "allow insecure content"/
"allow insecure local content" exceptions.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 67d92cd commit 3e44309
2 files changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
Binary file not shown.
0 commit comments