We do moderation but it takes time and is manual work.
I’d like to use a regex pattern to destroy specific links. Can anybody help me to construct a regex pattern for a link like this?
[text phrases](link to any page on a specific domain)
In my case [text phrases]
may have different text versions and I would leave it original.
I need to hide only this part: (link to a page on a specific domain)
where the domain is always the same, but the length and text of the link may be different.
The result should be like this:
[text phrases]■■■■■■■■■■■■■■■■■■■■■■■■
I found the topic, that previously censor function worked the way I need, but lately was changed: Censored words out of a URL
@riking > repro:
- add
adf.ly
to censored words list- post with
http://adf.ly/SpONsoREDliNK
- post renders with
<a href="http://■■■■■■/SpONsoREDliNK">http://■■■■■■/SpONsoREDliNK</a>
The censor only applies to text now per:
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/pretty-text/engines/markdown-it/censored.js.es6#L18-L22