We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdb1eb4 commit fec82b6Copy full SHA for fec82b6
Project/Sources/Classes/URL.4dm
@@ -40,6 +40,14 @@ Function _init()
40
41
Function parse($inURL : Text)
42
43
+ This._init()
44
+
45
+ // Before parsing, check if the URL is empty or valid
46
+ var $isValid : Boolean:=Match regex("^(https?|wss?):\\/\\/([^\\s\\/?#]+)([^\\s]*)$"; $inURL)
47
+ If (Not($isValid))
48
+ return
49
+ End if
50
51
// Parse the URL into its components
52
// Example: https://username:[email protected]:8080/path/to/resource?query=param#ref
53
// Result:
@@ -54,8 +62,6 @@ Function parse($inURL : Text)
54
62
// ref: ref
55
63
// queryParams: [{name: "query"; value: "param"}]
56
64
57
- This._init()
58
-
59
65
If (Length($inURL)>0)
60
66
61
67
// See: https://www.rfc-editor.org/rfc/rfc3986#appendix-B
0 commit comments