diff --git a/src/projector/html.ts b/src/projector/html.ts index f6e65d2..2650336 100644 --- a/src/projector/html.ts +++ b/src/projector/html.ts @@ -1,26 +1,7 @@ import {writeFile} from 'fs/promises'; import {Projector} from '../projector'; - -/** - * HTML encode. - * - * @param s Raw strings. - * @returns HTML strings. - */ -function he(s: string) { - return s.replace(/&/g, '&').replace(//g, '>'); -} - -/** - * HTML encode an attribute. - * - * @param s Raw strings. - * @returns HTML strings. - */ -function ha(s: string) { - return he(s).replace(/"/g, '"'); -} +import {htmlEncode} from '../util'; /** * ProjectorHtml object. @@ -301,7 +282,9 @@ export class ProjectorHtml extends Projector { '', '
', ' ', - ...(title === null ? [] : [`