Ciao, c’è un bug con Chat che ti permette di inviare messaggi vuoti che contengono solo spazi. Ho cercato nelle impostazioni ma non ho trovato nulla che potesse aiutarmi. Grazie.
3 Mi Piace
sam
(Sam Saffron)
22 Maggio 2023, 6:53am
2
Legittimo… questa è una svista e certamente sembra strana… dovremmo vietare “blank” sia lato server che lato client.
Blank è un animale difficile
When we have seen the same issue, we simply fence them with MD.
<here is the good stuff>
<here is the sweet stuff>
```<here is the good stuff>```
`<here is the sweet stuff>`
Hi there, I just installed discourse and found out that it didn’t support Zero Width Space at all. It is Khmer Unicode special character that represents a hidden space to separate each word. you can take a look here http://www.askcambodia.org/t/angelababy/21
@@whitespaces_regexp =
Regexp.new(
"(\u00A0|\u1680|\u180E|[\u2000-\u200A]|\u2028|\u2029|\u202F|\u205F|\u3000)",
Regexp::IGNORECASE,
).freeze
def self.normalize_whitespaces(text)
text&.gsub(@@whitespaces_regexp, " ")
end
Raccomando che usiamo anche qui il nostro text cleaner lato server per assicurarci che le persone non barino anche con se stesse.
4 Mi Piace
j.jaffeux
(Joffrey Jaffeux)
8 Giugno 2023, 6:20am
5
Abbiamo risolto questo problema in questo commit:
committed 06:06AM - 08 Jun 23 UTC
This fixes an issue where a user could send an empty
string as a chat message .… e.g ' ' and the message would
be posted. We don't want this, we need to strip the message
first before validating for length etc.
Grazie!
6 Mi Piace