Skip to content

Commit e4180dd

Browse files
committed
fix: use raw() so inline JS script is not HTML-escaped by Hono JSX
1 parent 0f4c505 commit e4180dd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/design/common/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Child } from 'hono/jsx'
2+
import { raw } from 'hono/html'
23
import { Header } from '../components/header'
34
import { Footer } from '../components/footer'
45
import { url } from '../../build/config'
@@ -25,7 +26,7 @@ export function Layout({
2526
<link rel="icon" href={url('/assets/favicon-192x192.png', config.basePath)} sizes="192x192" type="image/png" />
2627
<link rel="apple-touch-icon" href={url('/assets/apple-touch-icon.png', config.basePath)} />
2728
<meta name="msapplication-TileImage" content={url('/assets/mstile-270x270.png', config.basePath)} />
28-
<script>{`document.documentElement.classList.add('js')`}</script>
29+
<script>{raw(`document.documentElement.classList.add('js')`)}</script>
2930
<script type="module" src={url('/enhancements/register.js', config.basePath)} defer></script>
3031
</head>
3132
<body>

0 commit comments

Comments
 (0)