User:AnomieBOT/source/tasks/PERTableUpdater.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater * Update for gerrit:223440.
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * Don't crash if someone puts a bad regex in the title blacklist.
Line 127:
 
$re=~s!({{\s*ns\s*:\s*(.+?)\s*}})! replace_ns($api,$2) // $1 !ge;
 
# Validate each line, in case someone screws up the blacklist page
eval {
qr/^(?:$re)$/si;
};
if ( $@ ) {
$api->warn("Ignoring bad regex '$re' in $page\n");
next;
}
 
# Let's just hope no one ever uses {{int:}} here...