Modul:UrlCheck: Unterschied zwischen den Versionen

vereinfacht
K (Datum)
(vereinfacht)
Zeile 2: Zeile 2:
local UrlCheck = {
local UrlCheck = {
suite  = 'vCard',
suite  = 'vCard',
serial = '2020-03-31',
serial = '2020-04-01',
item  = 40849609
item  = 40849609
}
}
Zeile 70: Zeile 70:
-- path check
-- path check
if not skipPathCheck and aPath ~= '' then
if not skipPathCheck and aPath ~= '' then
-- replacing utf-8 characters > \x7F
if not aPath:match( '^[-A-Za-z0-9_.,~%%%+&:;#*?!=()@/\128-\255]*$' ) then
for i = 1, #aPath, 1 do
if aPath:byte( i ) > 127 then
aPath = aPath:sub( 1, i - 1 ) .. 'a' .. aPath:sub( i + 1 )
end
end
if not aPath:match( '^[-A-Za-z0-9_.,~%%%+&:;#*?!=()@/]*$' ) then
return 23
return 23
end
end
Anonymer Benutzer