User:SMcCandlish/Editfilters

Sandbox for edit-filter drafting.

Draft edit filter to catch addition of questionable sources
This is written to be easily extensible to detect addition of links to (or mentions of) sites that are generally not reliable sources nor the subject of encyclopedic coverage themselves, but which could occasionally be validly used as WP:PRIMARY for certain things.

I don't have access to Special:AbuseFilter/tools ("For security reasons, only users with the right to modify edit filters may use this interface"), so it's difficult to be certain the syntax is perfect. E.g., I wasn't certain that the boolean  works on strings inside , but it apparently does, since it's used at Special:AbuseFilter/657 to match various templates by detecting   followed by one of various template names separated by.

Code
article_namespace == 0 & (	( added_lines contains "quickanddirtytips.com|QuickAndDirtyTips.com|QUICKANDDIRTYTIPS.COM" & !(removed_lines contains "quickanddirtytips.com|QuickAndDirtyTips.com|QUICKANDDIRTYTIPS.COM") )	|	(	added_lines contains "messybeast.com|MessyBeast.com|MESSYBEAST.COM" & !(removed_lines contains "messybeast.com|MessyBeast.com|MESSYBEAST.COM") ) )