Skip to content

Commit

Permalink
allow video tags
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Dec 16, 2021
1 parent 4730621 commit fb0912d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function render(markdown: string, opts: RenderOptions = {}): string {

const allowedTags = sanitizeHtml.defaults.allowedTags.concat([
"img",
"video",
"svg",
"path",
]);
Expand All @@ -62,6 +63,7 @@ export function render(markdown: string, opts: RenderOptions = {}): string {
allowedAttributes: {
...sanitizeHtml.defaults.allowedAttributes,
img: ["src", "alt", "height", "width", "align"],
video: ["src", "alt", "height", "width"],
a: ["id", "aria-hidden", "href", "tabindex", "rel"],
svg: ["viewbox", "width", "height", "aria-hidden"],
path: ["fill-rule", "d"],
Expand Down

0 comments on commit fb0912d

Please sign in to comment.