Skip to content

Commit

Permalink
fix: update url regex (fix #51)
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzDerock committed Aug 21, 2022
1 parent dfd6085 commit 355eeb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exporthtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ function formatBytes(bytes: number, decimals = 2) {
}

function validateURL(url: string) {
return /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/i.test(
return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)$/i.test(
url
);
}
Expand Down

0 comments on commit 355eeb5

Please sign in to comment.