File tree Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Expand file tree Collapse file tree 4 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1- import { html } from "hono/html" ;
1+ import { html , raw } from "hono/html" ;
22import type { FC } from "hono/jsx" ;
33
44type HeaderCardProps = {
@@ -36,7 +36,9 @@ export const IndexHeaderCard: FC<HeaderCardProps> = ({
3636 ▼
3737 <!-- ▼ (because the corresponding one is not rendered) -->
3838 </ a >
39- < a href ="${ toIndexFolder } ${ chapterIndex } .html "> ${ displayTitle } </ a >
39+ < a href ="${ raw ( toIndexFolder ) } ${ chapterIndex } .html "
40+ > ${ raw ( displayTitle ) } </ a
41+ >
4042 </ h5 >
4143 </ div > ` ;
4244} ;
@@ -69,7 +71,9 @@ export const SidebarHeaderCard: FC<HeaderCardProps> = ({
6971 ▼
7072 <!-- ▼ (because the corresponding one is not rendered) -->
7173 </ a >
72- < a href ="${ toIndexFolder } ${ chapterIndex } .html "> ${ displayTitle } </ a >
74+ < a href ="${ raw ( toIndexFolder ) } ${ chapterIndex } .html "
75+ > ${ raw ( displayTitle ) } </ a
76+ >
7377 </ h5 >
7478 </ div > ` ;
7579} ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import LinksHead from "./html/LinksHead.js";
99import Licences from "./html/Licences.js" ;
1010import { generateChapterIndex } from "./tocUtils.js" ;
1111import { IndexHeaderCard , SidebarHeaderCard } from "./TocCards.js" ;
12- import { html } from "hono/html" ;
12+ import { html , raw } from "hono/html" ;
1313import type { WriteBuffer } from "./types.js" ;
1414
1515const truncateTitle = chapterTitle => {
@@ -109,8 +109,8 @@ export const recursiveProcessTOC = (
109109 aria-expanded ="false "
110110 aria-controls ="index-collapse- ${ index + 1 } "
111111 >
112- < a href ="${ toIndexFolder } ${ chapterIndex } .html ">
113- ${ displayTitle } </ a
112+ < a href ="${ raw ( toIndexFolder ) } ${ chapterIndex } .html ">
113+ ${ raw ( displayTitle ) } </ a
114114 >
115115 </ span >
116116 </ h5 >
@@ -129,8 +129,8 @@ export const recursiveProcessTOC = (
129129 aria-expanded ="false "
130130 aria-controls ="sidebar-collapse- ${ index + 1 } "
131131 >
132- < a href ="${ toIndexFolder } ${ chapterIndex } .html ">
133- ${ displayTitle } </ a
132+ < a href ="${ raw ( toIndexFolder ) } ${ chapterIndex } .html ">
133+ ${ raw ( displayTitle ) } </ a
134134 >
135135 </ span >
136136 </ h5 >
Original file line number Diff line number Diff line change 1- import { html } from "hono/html" ;
1+ import { html , raw } from "hono/html" ;
22import type { FC } from "hono/jsx" ;
33
44const HtmlHeadPart1 : FC = ( ) => {
@@ -119,7 +119,7 @@ const LinksHead: FC<LinksHeadProps> = ({
119119} ) => {
120120 return html `
121121 < head >
122- ${ ( < HtmlHeadPart1 /> ) } ${ children }
122+ ${ ( < HtmlHeadPart1 /> ) } ${ raw ( children ) }
123123 ${ ( < HtmlHeadPart2 toIndexFolder = { toIndexFolder } /> ) }
124124 </ head >
125125 ` ;
Original file line number Diff line number Diff line change 1- import { html } from "hono/html" ;
1+ import { html , raw } from "hono/html" ;
22import type { FC } from "hono/jsx" ;
33
44const NavigationElements : FC = ( ) => {
@@ -61,7 +61,7 @@ const Navigation: FC = () => {
6161 </ button >
6262 < span class ="toolt "
6363 > Legend< span class ="toolttext ">
64- ${ ( < NavigationElements /> ) }
64+ ${ raw ( < NavigationElements /> ) }
6565 </ span > </ span
6666 >
6767 </ nav > ` ;
You can’t perform that action at this time.
0 commit comments