Skip to content
This repository was archived by the owner on Feb 23, 2020. It is now read-only.

Commit e3b222f

Browse files
committed
Fix url regex
Signed-off-by: Jonas Kuche <[email protected]>
1 parent e9078a7 commit e3b222f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "zlnk"
3-
version = "0.4.4"
3+
version = "0.4.5"
44
authors = ["Jonas Kuche <[email protected]>"]
55

66
[dependencies]

src/env_loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct Env {
1414
pub disable_stats: bool
1515
}
1616

17-
const URL_REGEX: &'static str = r"^(https?://)?([\da-z\.-]+)\.([a-z\.]{2,6})([/\w \.-]*)*/?$";
17+
const URL_REGEX: &'static str = r"https?://(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)";
1818

1919
pub fn init() -> Env {
2020
dotenv().ok();

0 commit comments

Comments
 (0)