Skip to content

Commit c43ad26

Browse files
authored
Fix chat url parsing for tlds >3 chars (#6184)
Mojang only looks for urls with 2,3 chars but if we don't block urls with >3 their regex will still parse the url trimming the extra chars off the tld *sigh* Fixes #6156
1 parent e3b4e77 commit c43ad26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

providers/BaseProviders/src/main/java/net/ess3/provider/AbstractChatEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import java.util.regex.Pattern;
88

99
public interface AbstractChatEvent {
10-
Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-zA-Z]{2,3}(?:/\\S+)?)");
10+
Pattern URL_PATTERN = Pattern.compile("((?:(?:https?)://)?[\\w-_\\.]{2,})\\.([a-zA-Z]{2,}(?:/\\S+)?)");
1111

1212
boolean isAsynchronous();
1313

0 commit comments

Comments
 (0)