chatfilter: fix matching lt/gt

These are encoded as <lt> and <gt> and so require the patterns to match those, which is unintuitive
This commit is contained in:
Adam
2022-06-06 20:14:26 -04:00
parent 0da4a65ce2
commit 8be3210b87
2 changed files with 14 additions and 1 deletions

View File

@@ -320,7 +320,9 @@ public class ChatFilterPlugin extends Plugin
String censorMessage(final String username, final String message)
{
String strippedMessage = jagexPrintableCharMatcher.retainFrom(message)
.replace('\u00A0', ' ');
.replace('\u00A0', ' ')
.replaceAll("<lt>", "<")
.replaceAll("<gt>", ">");
String strippedAccents = stripAccents(strippedMessage);
assert strippedMessage.length() == strippedAccents.length();