FEATURE: Disallow putting urls in the title for TL-0 users (PR #13947)

This disallows putting URLs in topic titles for TL0 users, which means that:

  1. If a TL-0 user puts a link into the title, a topic featured link won’t be generated (as if it was disabled in the site settings)
  2. Server methods for creating and updating topics will be refusing featured links when they are called by TL-0 users
  3. TL-0 users won’t be able to put any link into the topic title. For example, the title “Hey, take a look at https://my-site.com” will be rejected:

Also, it improves a bit server behavior when creating or updating feature links on topics in the categories with disabled featured links. Before the server just silently ignored a featured link field that was passed to him, now it will be returning 422 response.

GitHub

It doesn’t seem like this class is used anywhere in the PR? Maybe just some rails naming magic I am missing.

Works well but I do have a nitpick I am not sure how we would solve. This works well to stop the URLs in the title, but if you just add spaces or other characters in the URL as spammers surely will you can get around the restriction quite easily; for example:

As I say, not sure how we can address this; it won’t defeat bad actors for long.

Yep, it’s magic, it’s in use here: