Bug in spoiler iOS notifications

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

I think this is a regression, but I’m not 100% sure of it.

3 Likes

I’m going to look into this since I am doing some other work around iOS and push notifications.

9 Likes

I think it comes from our excerpt parser that is being called here

We have some code to preserve spoilers but I don’t know why we did that and it seems like a bad idea

We should be replacing the whole spoiler with [spoiler] like we do for images.

9 Likes

Thanks @zogstrip, that was very helpful. Fixed in FIX: strip spoilers in notification excerpts · discourse/discourse@5594222 · GitHub

6 Likes