Closed capogreco closed 11 months ago
hmm, I'm not familiar with html sanitization, but it could be a problem on the deno_gfm side.
import { render } from "https://deno.land/x/gfm/mod.ts";
const html = `<div><wiggly worms="ewww">hello</wiggly>world</div>`
const body = render(html, {
disableHtmlSanitization: true,
});
console.log(body)
// -> <div>helloworld</div>
This is because /x/blog
has not released a tag since last September. I will create a PR with the necessary changes to create a new tag. Hopefully #118 gets merged alongside it since that seems like a nice feature.
To get around the tag issue now, you could always change your import map to:
{
"imports": {
"blog": "https://raw.githubusercontent.com/denoland/deno_blog/main/blog.tsx"
}
}
By the way, @hashrock I can't reproduce your example
import { render } from "https://deno.land/x/gfm@0.2.1/mod.ts";
const html = `<div><wiggly worms="ewww">hello</wiggly>world</div>`
const body = render(html, {
disableHtmlSanitization: true,
});
console.log(body) // <div><wiggly worms="ewww">hello</wiggly>world</div>
ref #120
To get around the tag issue now, you could always change your import map to:
{ "imports": { "blog": "https://raw.githubusercontent.com/denoland/deno_blog/main/blog.tsx" } }
incredible - many thanks @lino-levan !!
@lino-levan
Oh, you are right. I couldn't reproduce it anymore. I guess my cache was old.
Should this issue be closed?
markdown file looks like this:
Which should show an embed of one of my p5 sketches. Alas, it looks like this:
ie. the iframe was sanitized out. Am I doing something wrong, or is disable_html_sanitization not working?