Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip HTML #37

Open
leolobato opened this issue Aug 24, 2015 · 3 comments
Open

Strip HTML #37

leolobato opened this issue Aug 24, 2015 · 3 comments

Comments

@leolobato
Copy link

This is a feature suggestion.

Since the HTML is already parsed, maybe it would be possible to add a method which strips the HTML but keeps the line breaks?

I'm specially thinking about this to be used on watchOS 2 projects, where NSAttributedString can't be used to strip HTML and it was quite a popular solution.

@nolanw
Copy link
Owner

nolanw commented Sep 4, 2015

Sorry for the delay in getting back to you, and thank you for your patience!

Just to make sure I understand, how does the output you're looking for differ from simply taking an HTMLDocument instance's -textContent? Special handling of <br> tags?

Could you supply brief sample of a document and the stripped output you'd expect? It'd be perfect for a unit test.

I'm guessing this'll be a pretty easy feature to implement, so I'm excited to add it!

@eternalphane
Copy link

@nolanw maybe like .strings and stripped_strings in BeutifulSoup?

@nolanw
Copy link
Owner

nolanw commented Apr 18, 2017

@eternalphane looks about right. Still not sure if it solves the original issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants