[string-strip-html] URLs are output even if tag is stripped
See original GitHub issuePackage’s name
string-strip-html
Describe the bug
const html = `
Show in plaintext
<not-plaintext>
<p>No images? <a href="url">Click here</a>.</p>
</not-plaintext>
`
stripHtml(`a <pre><code>void a;</code></pre> b`, {
stripTogetherWithTheirContents: ['not-plaintext'],
dumpLinkHrefsNearby: {
enabled: true
}
})
Result:
Show in plaintext
url
Expected:
Show in plaintext
Issue Analytics
- State:
- Created a year ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
string-strip-html - npm
Any URL links can be extracted and put after a previously linked element. Works when opening or closing tag bracket is missing on...
Read more >string-strip-html open source npm package - Codsen
It's used when multiple strings are stripped from tags and then concatenated. ... false, Used to customise the output of link URL's: to...
Read more >TypeError: stripHtml is not a function - Stack Overflow
I'm working a blog website using Next Js, when I try to make blog api for rich text-editor using string-strip-html then show me...
Read more >string-strip-html - npm Package Health Analysis - Snyk
Strip HTML tags from strings. No parser, accepts mixed sources. For more information about how to use this package see README.
Read more >string-strip-html | Yarn - Package Manager
If you're not ready yet, install an older version of this program, 8.3.0 ( npm i string-strip-html@8.3.0 ).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
btw first stage is complete, I patched all known
string-strip-html
issues/features/bugs, the 11.6.13 is out, now onto CJSBut anyway, we digress - let’s take this separately, I’d be more than happy to work with you on improving Maizzle 👍