For the most part, our sanitizer is automatically configured. But in certain instances– namely where we need to generate plaintext from a string of Markdown –it would errantly serialize <style> tag content.
[x] new RDMD stripTags option
Pass a list of tag names to force-strip them from the RDMD output. So to get rid of all style tags, you'd pass:
rdmd.hast(body, { stripTags: ["style"] });
🤷 Customer Changes
Once this hits the monorepo, customers should no longer see weird looking meta excerpts for their docs in Google.
🧰 Changes
For the most part, our sanitizer is automatically configured. But in certain instances– namely where we need to generate plaintext from a string of Markdown –it would errantly serialize
<style>
tag content.[x] new RDMD
stripTags
option Pass a list of tag names to force-strip them from the RDMD output. So to get rid of all style tags, you'd pass:🤷 Customer Changes
Once this hits the monorepo, customers should no longer see weird looking meta excerpts for their docs in Google.