-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix format issues, and change data back to function instead for test …
…-A since it failed in CI for some reason...
- Loading branch information
Showing
7 changed files
with
635 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import dev from "./server/dev.ts"; | ||
|
||
if (import.meta.main) { | ||
dev(Deno.args); | ||
dev(Deno.args); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
/** @format */ | ||
|
||
const ESCAPE_LOOKUP: { [match: string]: string } = { | ||
"&": "\\u0026", | ||
">": "\\u003e", | ||
"<": "\\u003c", | ||
"\u2028": "\\u2028", | ||
"\u2029": "\\u2029", | ||
"&": "\\u0026", | ||
">": "\\u003e", | ||
"<": "\\u003c", | ||
"\u2028": "\\u2028", | ||
"\u2029": "\\u2029", | ||
}; | ||
|
||
const ESCAPE_REGEX = /[&><\u2028\u2029]/g; | ||
|
||
export function escapeHtml(html: string) { | ||
return html.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]); | ||
return html.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match]); | ||
} | ||
|
||
export interface SafeHtml { | ||
__html: string; | ||
__html: string; | ||
} | ||
|
||
export function createHtml(html: string): SafeHtml { | ||
return { __html: html }; | ||
return { __html: html }; | ||
} |
Oops, something went wrong.
3282afd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to deploy: