mirror of
https://github.com/mue/mue.git
synced 2026-07-17 05:54:14 +02:00
fix(regex): Allow all TLDs
Fix for #627 - Updates all URL regexes to allow up to 63 octets for TLDs, which is the RFC 1034 standard (https://www.rfc-editor.org/rfc/rfc1034)
This commit is contained in:
@@ -125,7 +125,7 @@ export default class CustomSettings extends PureComponent {
|
||||
// regex: https://ihateregex.io/expr/url/
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const urlRegex =
|
||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_.~#?&=]*)/;
|
||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._~#=]{1,256}\.[a-zA-Z0-9()]{1,63}\b([-a-zA-Z0-9()!@:%_.~#?&=]*)/;
|
||||
if (urlRegex.test(e) === false) {
|
||||
return this.setState({
|
||||
urlError: variables.getMessage('widgets.quicklinks.url_error'),
|
||||
|
||||
Reference in New Issue
Block a user