mixmark-io/turndown
View on GitHubKeeping/removing metadata content elements (e.g. script, style, title)
Open
#210 opened on Dec 20, 2017
help wanted
Description
<script>, <style>, and <title> elements are not visible on a rendered web page, however Turndown will output their contents, e.g.
turndownService.turndown('<script>alert("Hello world")</script>') // alert("Hello world")
Perhaps these could be removed by default? The behaviour could be overridden with turndownService.keep (to render the elements wrapped in their tag) or by adding a rule. Or perhaps we should keep the default behaviour and add options to keep/remove e.g. keepScript, removeScript, keepStyle, removeStyle, keepTitle, removeTitle?