dfabulich
(Dan Fabulich)
1
There’s a bug in the way the Discourse Hub iOS app handles spoilers; it shows the spoiler text in the clear.
To reproduce: Install the Discourse Hub iOS app, sign in to a forum, and sign up for notifications.
Use a separate account to send yourself a private message containing a blurred spoiler, like this. You’ll receive a push notification of the PM.
Actual:
Expected: The spoiler text should be concealed.
6 Likes
dfabulich
(Dan Fabulich)
2
I think this is a regression, but I’m not 100% sure of it.
3 Likes
pmusaraj
(Penar Musaraj)
4
I’m going to look into this since I am doing some other work around iOS and push notifications.
9 Likes
zogstrip
(Régis Hanol)
5
I think it comes from our excerpt parser that is being called here
https://github.com/discourse/discourse/blob/b58867b6e936a5247304e9f06f827cf5012a92ed/app/services/post_alerter.rb#L432
We have some code to preserve spoilers but I don’t know why we did that and it seems like a bad idea
https://github.com/discourse/discourse/blob/b58867b6e936a5247304e9f06f827cf5012a92ed/lib/excerpt_parser.rb#L111-L115
We should be replacing the whole spoiler with [spoiler]
like we do for images.
10 Likes
pmusaraj
(Penar Musaraj)
6
7 Likes