Skip to content

Commit da564ee

Browse files
committed
Revert "fix: validate URL format before parsing in the parse function"
This reverts commit fec82b6.
1 parent fec82b6 commit da564ee

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Project/Sources/Classes/URL.4dm

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ Function _init()
4040

4141
Function parse($inURL : Text)
4242

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-
5143
// Parse the URL into its components
5244
// Example: https://username:[email protected]:8080/path/to/resource?query=param#ref
5345
// Result:
@@ -62,6 +54,8 @@ Function parse($inURL : Text)
6254
// ref: ref
6355
// queryParams: [{name: "query"; value: "param"}]
6456

57+
This._init()
58+
6559
If (Length($inURL)>0)
6660

6761
// See: https://www.rfc-editor.org/rfc/rfc3986#appendix-B

0 commit comments

Comments
 (0)