Discourse Spoiler Alert

Is there any update on this?

Due to technical limitations in browsers, it’s not currently possible.

If a spoiler blur is placed over a URL, then when the user clicks on the spoiler, the URL opens before the user gets a chance to see what they’re clicking on. This allows the original poster to potentially send the unsuspecting user somewhere inappropriate.

Expected Behaviour:
Clicking on the spoiler should remove the blur and make the URL underneath accessible, but not open the link. This is how it works in the compose preview pane. But, once the message is posted, the above issue occurs.

I raised this previously, but can’t find the topic. The issue still occurs.

Here’s a safe example, but it could be used to open malware or inappropriate material: (Click below)

@Biscuit moved your post here. See details above.

1 Like

Thanks Joshua. Forgot this is a plug-in.

If you have any idea how to fix it, I’d be happy to add it :wink:

Ha! My strategy is to report the issue and await the fairies to do their magic.

I’m not a developer, so I can’t help solve it technically.

4 Likes

Ok, this should now be fixed :wink:

Links is now only (CTRL+click or middle click)able though.

12 Likes

Nice one Zogstrip!! Thanks.

Aha so this is what you mean by “fixed”, I wondered about that :rofl:

3 Likes

I don’t know if it’s related to the latest commit, but we can’t quote a whole line that ends with a spoiler

Hightlight this line and this line only

It’s blocked just before the spoiler part

I don’t know if it’s expected behaviour or a bug, I just wanted to ask just in case

3 Likes

this is probably a won’tfix, but this plugin has always conflicted with Font Rendering Enhancer - Chrome Web Store, which is only notable insofar as I’ve never seen that Chrome extension (which I consider necessary to get decent font rendering on non-high-DPI Chrome Windows environments) conflict with anything else. the discourse spoilered text becomes unclickable.

There is a problem with this plugin on the newest version of Discourse: if between the “spoiler” tags an empty line is present, the spoiler is not rendered any more.

Example. This was working before, now it doesn’t:

[spoiler]Test

Test[/spoiler]

WIthout the empty line it works:

Test
Test
Test

Why do you need to enter it that way? This works fine. Don’t mix tags and text on the same line

[spoiler]
Test

Test
[/spoiler]
3 Likes

Thanks Jeff! This will work. Users of one community forum that I manage asked me about this change in the plug-in behaviour since they were using the feature before without taking care of mixing tags and text.

3 Likes

Hi all! I think I’ve found a little bug in the plugin:

--force-with-lease is a safer option that will not overwrite any work on the remote branch if more commits were added to the remote branch (by another team-member or coworker or what have you). It ensures you do not overwrite someone elses work by force pushing.

Noticed, that the backticked text is readable?

4 Likes

Hey there, thank you for making this feature. It’s elegant and nice to use. I have 3 questions for this plugin.

  1. Does this prevent google from indexing the content within the spoiler tags?
    Hidden text and links - Search Console Help
    (I wish so, cuz I use this function to hide contact number, cell number which is private and nobody wants to be indexed for his/her activities on the internet.)

  2. Seems that the spoiler tag would prevent the users to select the content on their cell phone. I am using iPhone Safari to test, and I find that I can no longer select the content with tags with a long press. I guess that the spoiler acts like a button. Usually, text or the button or links on any device cannot be selected partially.
    I know this is not a proper practice but is there any way to solve this problem? I think this would be a problem for other people too, cuz if a user no longer can copy and paste content from spoiler tags, it’s inconvenient!

  3. I find that if I comment out user-select: none; I can temporary solve it. But I am not familiar with javascript, and this plugin made this property inline. How can I edit the plugin so that I can remove user-selct:none; when content is already spoiled?

I guess I came across a bug within this topic. If I zoom ‘enough’ it’s remove the blur effect.

Partly uncovered while zooming and then completely:


Likely to be browser / OS specific rendering artifacts.

It happens on two different devices with Android 7 and 9. It doesn’t affect practical use of blur though.