denoland / deno-gfm

Server-side GitHub Flavored Markdown rendering for Deno
https://jsr.io/@deno/gfm
MIT License
221 stars 33 forks source link

title="null" with disableHtmlSanitization: true #61

Closed hashrock closed 1 year ago

hashrock commented 1 year ago

Report on twitter

https://twitter.com/kebsworld/status/1652289518249099270 image

Minimal Reproduction

script:

import { render } from "https://deno.land/x/gfm@0.2.1/mod.ts";
const body = "[hello](https://example.com/) World";
const html = render(body, {
  disableHtmlSanitization: true,
});
console.log(html);

result:

<p><a href="https://example.com/" title="null" rel="noopener noreferrer">hello</a> World</p>

But not reproduced with no option:

script:

import { render } from "https://deno.land/x/gfm@0.2.1/mod.ts";
const body = "[hello](https://example.com/) World";
const html = render(body);
console.log(html);

result:

<p><a href="https://example.com/" rel="noopener noreferrer">hello</a> World</p>