File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,12 +32,12 @@ export default function isFQDN(str, options) {
3232 return false ;
3333 }
3434
35- if ( ! / ^ ( [ a - z \u00a1 - \uffff ] { 2 , } | x n [ a - z 0 - 9 - ] { 2 , } ) $ / i. test ( tld ) ) {
35+ if ( ! / ^ ( [ a - z \u00A1 - \u00A8 \u00AA - \uD7FF \uF900 - \uFDCF \uFDF0 - \uFFEF ] { 2 , } | x n [ a - z 0 - 9 - ] { 2 , } ) $ / i. test ( tld ) ) {
3636 return false ;
3737 }
3838
39- // disallow spaces && special characers
40- if ( / [ \s \u2002 - \u200B \u202F \u205F \u3000 \uFEFF \uDB40 \uDC20 \u00A9 \uFFFD ] / . test ( tld ) ) {
39+ // disallow spaces
40+ if ( / \s / . test ( tld ) ) {
4141 return false ;
4242 }
4343 }
Original file line number Diff line number Diff line change @@ -1099,6 +1099,18 @@ describe('Validators', () => {
10991099 'domain.com/' ,
11001100 '/more.com' ,
11011101 'domain.com�' ,
1102+ 'domain.co\u00A0m' ,
1103+ 'domain.co\u1680m' ,
1104+ 'domain.co\u2006m' ,
1105+ 'domain.co\u2028m' ,
1106+ 'domain.co\u2029m' ,
1107+ 'domain.co\u202Fm' ,
1108+ 'domain.co\u205Fm' ,
1109+ 'domain.co\u3000m' ,
1110+ 'domain.com\uDC00' ,
1111+ 'domain.co\uEFFFm' ,
1112+ 'domain.co\uFDDAm' ,
1113+ 'domain.co\uFFF4m' ,
11021114 'domain.com©' ,
11031115 'example.0' ,
11041116 '192.168.0.9999' ,
You can’t perform that action at this time.
0 commit comments