4 ms·
Isn't it more or less a cliche that using sed etc for stripping HTML tags is unreliable and potentially hazardous? I've tried it. I could get it to apparently
by mirimir 8y ago
Isn't it more or less a cliche that using sed etc for stripping HTML tags is unreliable and potentially hazardous?
I've tried it. I could get it to apparently "work". But then I'd get some input that hosed it. Now I just use "w3m -dump". I mean, it's a browser.
- mannykannot 8y agoThe unreliability follows from it being "basically unreadable", which leads to it probably not doing what you intend. Whether it is hazardous depends on what you use it for.
- noxToken 8y agoThere's the classic Stack Overflow answer[0] about matching HTML tags. If you have a small subset of HTML, it can work out pretty well. [0]: https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 https://stackoverflow.com/questions/1732348/regex-match-open...
- mirimir 8y agoThanks. That's what I was thinking of. Classic "this parrot is dead" riff.