Fix dezalgo
Changes how dezalgo works. Still filters zalgo text without breaking languages. Removes zalgo tolerance because it's not really necessary with this system.
This commit is contained in:
parent
e44f687030
commit
4ca54e8761
@ -770,7 +770,7 @@ AOPacket AOClient::validateIcPacket(AOPacket packet)
|
||||
|
||||
QString AOClient::dezalgo(QString p_text)
|
||||
{
|
||||
QRegExp rxp("([\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f\u115f\u1160\u3164]{" + QRegExp::escape(QString::number(server->zalgo_tolerance)) + ",})");
|
||||
QRegularExpression rxp("([̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼͇͈͉͍͎̀́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾̿̀́͂̓̈́͆͊͋͌̕̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͣͤͥͦͧͨͩͪͫͬͭͮͯ͘͜͟͢͝͞͠͡])");
|
||||
QString filtered = p_text.replace(rxp, "");
|
||||
return filtered;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user