content: exclude links to ip addresses
#53
Merged
offbyn
merged 2 commits from content-exclude-iplinks
into master
2 years ago
Loading…
Reference in New Issue
There is no content yet.
Delete Branch 'content-exclude-iplinks'
Deleting a branch is permanent. It CANNOT be undone. Continue?
There is no good reason to link to an ip directly.
fixes #44
@ -35,6 +35,9 @@ function isValidURL(url) {
if (lastDot < 1) {
return false;
}
if (url.hostname.slice(lastDot + 1).match(/^[\d]+$/)) {
would be very nice to check ipv6 too. in that case, i guess you could just check for colon?
@ -38,1 +38,4 @@
if (url.hostname.slice(lastDot + 1).match(/^[\d]+$/)) {
return false;
}
if (url.hostname.slice(lastDot) === '.local') {
btw, also refuse localhost?
a59b3a84d2
tod7f75f92e0
2 years agod7f75f92e0
into master 2 years agoReviewers
d7f75f92e0
.Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.