Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.
Änderungen
Zur Navigation springen
Zur Suche springen
Zeile 1:
Zeile 1:
− +
Zeile 78:
Zeile 78:
− +
Zeile 345:
Zeile 345:
− +
Zeile 367:
Zeile 367:
− +
Zeile 594:
Zeile 594:
− +
+
+
+
+
+
+
+
Zeile 608:
Zeile 615:
− +
+
+
2016-01-01
local URLutil = { suite = "URLutil",
local URLutil = { suite = "URLutil",
serial = "2015-12-05" };
serial = "2016-01-01" };
--[=[
--[=[
Utilities for URL etc. on www.
Utilities for URL etc. on www.
if type( url ) == "string" then
if type( url ) == "string" then
local colon, host, port
local colon, host, port
local pattern = "^%s*%w*:?//([%w%.%%-]+)(:?)([%d]*)/"
local pattern = "^%s*%w*:?//([%w%.%%_-]+)(:?)([%d]*)/"
local s = mw.text.decode( url )
local s = mw.text.decode( url )
local i = s:find( "#", 6, true )
local i = s:find( "#", 6, true )
local r
local r
if type( s ) == "string" then
if type( s ) == "string" then
local pattern = "^%s*([%w%.%%-]+)(:?)(%d*)%s*$"
local pattern = "^%s*([%w%.%%_-]+)(:?)(%d*)%s*$"
local host, colon, port = mw.ustring.match( s, pattern )
local host, colon, port = mw.ustring.match( s, pattern )
if colon == ":" then
if colon == ":" then
local r
local r
if type( s ) == "string" then
if type( s ) == "string" then
local scan = "^%s*([%w%.%%-]+%w)%.(%a[%w-]*%a)%s*$"
local scan = "^%s*([%w%.%%_-]+%w)%.(%a[%w-]*%a)%s*$"
local scope
local scope
s, scope = mw.ustring.match( s, scan )
s, scope = mw.ustring.match( s, scan )
if URLutil.getAuthority( url ) then
if URLutil.getAuthority( url ) then
if not url:match( "%S%s+%S" ) then
if not url:match( "%S%s+%S" ) then
return true
local s1, s2 = url:match( "^([^#]+)(#.*)$" )
if s2 then
if url:match( "^%s*[a-zA-Z]*://(.+)/" ) then
return true
end
else
return true
end
end
end
end
end
local s = URLutil.getAuthority( url )
local s = URLutil.getAuthority( url )
local pat = "[%[|%]" ..
local pat = "[%[|%]" ..
mw.ustring.char( 8201, 45, 8207, 8234, 45, 8239, 8288 )
mw.ustring.char( 8201, 45, 8207,
8234, 45, 8239,
8288 )
.. "]"
.. "]"
if s:find( "@" )
if s:find( "@" )