-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[newsfeed] Line break tags <br> should be replaced with spaces #3235
Comments
Hi, I don’t know if that’s really intended but according to the code it removes the see original code in Try to replace this line by maybe it will be better in your case Result will be as you want: |
@bugsounet Yes, that's exactly the solution needed. |
That line is from waaaay back, maybe @MichMich can weigh in and tell if it can be replaced by the html-to-text library used directly below? |
I've got absolutely no idea anymore. 🙈 |
well, 7 years is a long time... but maybe its really just trying to get rid of any html tags. which looks weird with would just replacing those with an empty space " " look always okay I wonder? @d42ohpaz do you want to code something (remove the regex and try to make a good looking description with some more options passed to the html-to-text library)? |
I will inspect html-to-text library options because actually, without regex, It display web links. I don't think it's raeally neded to display this For remember I add html-to-text library for delete |
@d42ohpaz can you check if the latest develop branch fixes your problem? |
Yup, looks fixed in latest develop branch. Thank you! |
As an example, if you look at the RSS feed for lemmy.world, you'll notice that it uses line breaks. Because the newsfeed module seems to strip out HTML (rightfully so), it causes some of the text to be butted up against each other:
Instead of stripping out <br> tags, it should replace them with a space (or non-breaking space ( )).
The text was updated successfully, but these errors were encountered: