5370
ediciones
m (1 revisión importada) |
Sin resumen de edición |
||
(No se muestran 3 ediciones intermedias de 2 usuarios) | |||
Línea 274: | Línea 274: | ||
if not checkurl( URL ) then | if not checkurl( URL ) then | ||
error_str = seterror( 'bad_url', {}, false, " " ) .. error_str; | error_str = seterror( 'bad_url', {}, false, " " ) .. error_str; | ||
elseif | elseif | ||
not mw.title.getCurrentTitle().text:match(' | not mw.title.getCurrentTitle().text:match('Wiki TVenserio') and | ||
URL:match('// | URL:match('//www.wikitvenserio.com') then | ||
error_str = seterror( 'bad_url_autorreferencia', {}, false, " " ) .. error_str; | error_str = seterror( 'bad_url_autorreferencia', {}, false, " " ) .. error_str; | ||
end | end | ||
Línea 597: | Línea 597: | ||
while true do | while true do | ||
local urlPattern = "%[%w*:?//[^ ]+%s+([%w%d].*)%]" | |||
if nil == | local urlMatch = pages:match(urlPattern); -- pattern is the opening bracket, the url and following space(s): "[url " | ||
pages = pages:gsub( | if nil == urlMatch then break; end -- no more urls | ||
pages = pages:gsub(urlPattern, "%1"); -- remove as many instances of pattern as possible | |||
end | end | ||
pages = pages:gsub("[%[%]]", ""); -- remove the brackets | pages = pages:gsub("[%[%]]", ""); -- remove the brackets |