How to automatically replace a double exclamation point when a message is saved?


(Daniela) #1

I’m looking for a way to prevent double exclamation points when a user replies to messages.

In my particular case I have a super-user who has the bad habit (since 15 years) to conclude each sentence with !!

All older users know it is his way to write but new users often feel attacked by him (even if it is not his intention).
This sometimes generates bad responses from new users and I have to intervene to calm the situation.

Consider that I asked him several times to avoid !! at the end of a sentence, but his answer is that he does it unconsciously.

I know that I can use Replace a string in all posts to replace !! with a point, but this would only work on posts already published, not on those that will be published.

The only way I can think is to enter !! in watched words so that they are replaced by two black squares, but I find this method a little exaggerated.

Is there any other way?


(Régis Hanol) #2

IMHO the best way would be to write a plugin that would automatically replace [\s!]+$ by a single !.


(Daniela) #3

Well, writing a plugin for a single user does not seem very useful, I thought of something less challenging, such as a js script or something like that… :sweat_smile:


(Jay Pfaffman) #4

There is a censored pattern site setting. You could replace his bangs with blocks. It would K silly, but no more silly than what he’s doing.

Or, you could have him pay to develop the plugin since he’s unwilling to reprogram himself.


(Daniela) #5

After 15 years I think it has become a real mania or something that goes beyond his control.
He writes in this way not only on our forum, but everywhere, even on facebook and twitter.

BTW I think I will use the censored pattern you’ve suggested to me if there are no other alternatives.


(Jay Pfaffman) #6

I was kidding about how funding the plugin. If he cared, there are browser plugins that could catch that for him