Skip to content

Commit 92cfabb

Browse files
committed
Fix URL Regex
1 parent c6d2cff commit 92cfabb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/pages/assets/asset-create/asset-create.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class AssetCreateComponent implements OnInit {
100100
config = CKEDITOR_CONFIG
101101
selectedAssetTypeVocabularies: Vocabulary[]
102102

103-
urlPattern: RegExp = /^(file|ftp|http|https|imap|irc|nntp|acap|icap|mtqp|wss):\/\/(?:localhost|(?:[a-z\d]([a-z\d-]*[a-z\d])*)|(?:[a-z\d]([a-z\d-]*[a-z\d])*\.?[a-z]{2,})|(?:(\d{1,3}\.){3}\d{1,3}))(:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
103+
urlPattern: RegExp = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)$/;
104104

105105
private fetch$ = new BehaviorSubject(null);
106106

0 commit comments

Comments
 (0)