-
-
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: Convert HTML entities to characters #3092
Newsfeed: Convert HTML entities to characters #3092
Conversation
2cdde86
to
14ed764
Compare
I'm not sure but reading this issue and this PR this should already be possible by setting the newsfeed config option @peterkappelt can you test this? Or provide the feed url so I can test this? @rejas maybe we should add the missing config option to the docs? |
Hi, I'd prefer to not enable that flag on a production-like system. The current pull request is just making sure that the special HTML entities are displayed properly. This is a feed that includes |
@rejas if you find some time (and because you implemented #2736): I'm not very happy having 2 implementations to render html in the newsfeed title so I like to know your thoughts about this. If we accept this PR we should revert the On the other side we already have the |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## develop #3092 +/- ##
===========================================
+ Coverage 25.94% 25.96% +0.01%
===========================================
Files 53 53
Lines 11572 11583 +11
===========================================
+ Hits 3002 3007 +5
- Misses 8570 8576 +6
|
My 2 cents in a hurry:
|
If everyone agrees that that's the preferred solution I could definitely implement it that way, if it would help getting this PR merged. Honestly, I don't really see the purpose of keeping an option that is neither documented nor recommended and prefixed |
@peterkappelt the problem is embedded chars in the newsfeed titles in sone countries, German umlats in particular. the default handling drops them. to get it to work, requires enabling some translation function which does NOT CHECK for things that could be code, which could be a backdoor into your system. which ugly choice do you prefer? |
hi @peterkappelt could you check out #3191 if that would solve your problem too? |
the reason not documented is we don't want everyone using it.. someone will report on the forum and we will advise them and explain the risks.. |
Closing this. We have a similar PR merged. If @peterkappelt needs, he can reopen this to keep the discussion running again |
Hey everyone, a local newsfeed includes HTML entities (like
"
and some Umlauts) rather than normal characters in their titles.Looks quite strange:
This PR adds some code to properly convert those entities (basically anything starting with
&
and ending with;
) in a safe manner, while not requiringdangerouslyDisableAutoEscaping
to be set.Let me know if you've got any thoughts!