codidact / qpixel

Q&A-based community knowledge-sharing software
https://codidact.com
GNU Affero General Public License v3.0
375 stars 70 forks source link

Disable links in posts if there's an active spam flag #1333

Open cellio opened 3 months ago

cellio commented 3 months ago

https://meta.codidact.com/posts/291174/291177#answer-291177

Spammers include links in their posts. The blatant ones show the raw URL; the more astute ones inject spam links that look like legitimate links by doing things like see the [documentation](http://spam.example.com). Is it feasible to suppress rendering links if the post has any active spam flags? I mean both the blatant ones and the stealthy ones: active spam flag = no active links (but for the raw ones you'd see the URL as text).

The primary goal is to prevent accidental clicks (could be spam or malware). A secondary goal is to take away any other benefits spammers get from active links (for example referrer counts).

I don't know how easy or hard this is, given that we're using libraries for Markdown rendering. I know we use different ones client-side and server-side, and the server-side one is the important one here. I don't really mind if the spammer sees the spam link in a draft post.

ArtOfCode- commented 2 months ago

Not trivial, but probably possible with a bit of work - needs investigation.