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

remove html tags from string #336

Closed
isarojdahal opened this issue Jun 25, 2020 · 4 comments
Closed

remove html tags from string #336

isarojdahal opened this issue Jun 25, 2020 · 4 comments

Comments

@isarojdahal
Copy link

There should be method where HTML can be parsed to string so that it won't include any HTML tags or elements.

@erickok
Copy link
Collaborator

erickok commented Jun 25, 2020

How does that relate to a library for generating html? Can you explain the use case in the context of this library?

@isarojdahal
Copy link
Author

I have fetched blog post HTML code and displayed to the mobile screen by using this package but if the user wants to share the blog post to other application then it shouldn't show any HTML tags, instead, it should show only the data so, in that case, If there was HTML tags remover then it will be great. just a method is required and everything will be in this package flutter_html.

@erickok
Copy link
Collaborator

erickok commented Jun 26, 2020

Here are some suggested ways to strip html, with the answer that looks promosing to me (using Dart’s built in html package) highlighted: https://stackoverflow.com/a/51594285/243165

@ryan-berger
Copy link
Collaborator

@originalsaroj What @erickok has suggested is a great idea. This sort of change really isn't within the scope of flutter_html but it looks like it wouldn't be too hard to format your HTML input before you fed it into flutter_html.

It looks to me this issue has a good solution, so I'd like to close it. If there is an actual proposal for how we are changing the API and why stripping your own HTML isn't the way to go, please respond and we can discuss. Otherwise I'll close this issue in a couple of days

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