You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
Commit cb51116
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ngInput): change URL_REGEXP to better match RFC3987
The URL_REGEXP in use to perform validation in ngInput is too restrictive and fails to
follow RFC3987. In particular, it only accepts ftp, http, and https scheme components and
rejects perfectly valid schemes such as "file", "mailto", "chrome-extension",
etc. The regex also requires the scheme to be followed by two "/" but the RFC says
0 to n are acceptable. This change fixes both of these issues to better align to
the standard.
Closes#11341Closes#11381
Copy file name to clipboardExpand all lines: src/ng/directive/input.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,8 @@
11
11
12
12
// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231
// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)
// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)
0 commit comments