This website works better with JavaScript.
Home
Explore
Help
Sign In
JustAnotherArchivist
/
little-things
Watch
2
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Normalise domain name to lower-case before further processing
master
JustAnotherArchivist
4 years ago
parent
e655080e20
commit
d7a07d1d99
1 changed files
with
8 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-0
url-normalise
+ 8
- 0
url-normalise
View File
@@ -55,6 +55,14 @@ do
suffix=""
fi
# Normalise domain
if [[ "${url}" =~ ^https?://.*/ ]]
then
domain="${url#*://}"
domain="${domain%%/*}"
url="${url%%://*}://${domain,,}/${url#*://*/}"
fi
if [[ "${url}" =~ ^https?://((www|m|[a-z][a-z]-[a-z][a-z]).)?facebook.com/login/.*[?\&]next=https?%3A%2F%2F((www|m|[a-z][a-z]-[a-z][a-z]).)?facebook.com%2F && "${url}" != *'%0A'* && "${url}" != *'%00'* ]]
then
url="${url##*\?next=}"
Write
Preview
Loading…
Cancel
Save