Edit filter configuration

Differences between versions

ItemVersion from 20:26, 7 May 2023 by Suffusion of YellowVersion from 20:25, 8 May 2023 by Suffusion of Yellow
Basic information
Notes:
Watch for people filling in (or changing) certain fields in {{infobox civilian attack}}. Tends to be a magnet for BLP-violating edits, sometimes even from experienced editors. --Suffusion of Yellow 22:40 16 May 2022
Watch for people filling in (or changing) certain fields in {{infobox civilian attack}}. Tends to be a magnet for BLP-violating edits, sometimes even from experienced editors. --Suffusion of Yellow 22:40 16 May 2022


Exclude empty fields, whitespace adjustments, and math tags (\perp = ...). --Suffusion of Yellow 21:06 26 Jun 2022
Exclude empty fields, whitespace adjustments, and math tags (\perp = ...). --Suffusion of Yellow 21:06 26 Jun 2022


Try to exclude some articles about historic events; these tend to be in categories like "1857 murders", etc. --Suffusion of Yellow 21:17 26 Jun 2022
Try to exclude some articles about historic events; these tend to be in categories like "1857 murders", etc. --Suffusion of Yellow 21:17 26 Jun 2022


Force generation of page_age variable for later testing; thinking of creating a warning filter targeting newer pages. --Suffusion of Yellow 02:59 5 Sep 2022
Force generation of page_age variable for later testing; thinking of creating a warning filter targeting newer pages. --Suffusion of Yellow 02:59 5 Sep 2022


Attempt to exclude VE dirty diffs, and changes to the references that don't change the name of the perp. Still flagging additions of sections like "==Perpetrator==", not sure if that's a bug or a feature. --Suffusion of Yellow 20:43 20 Nov 2022
Attempt to exclude VE dirty diffs, and changes to the references that don't change the name of the perp. Still flagging additions of sections like "==Perpetrator==", not sure if that's a bug or a feature. --Suffusion of Yellow 20:43 20 Nov 2022


Add a tag. Tempted to share the "possible BLP issue or vandalism" tag but don't like the "or vandalism" part. --Suffusion of Yellow 19:06 19 Apr 2023
Add a tag. Tempted to share the "possible BLP issue or vandalism" tag but don't like the "or vandalism" part. --Suffusion of Yellow 19:06 19 Apr 2023


Require at least one non-whitespace character; otherwise can trip when the name is removed, e.g. [[Special:AbuseLog/34904486]]. --Suffusion of Yellow 19:35 19 Apr 2023
Require at least one non-whitespace character; otherwise can trip when the name is removed, e.g. [[Special:AbuseLog/34904486]]. --Suffusion of Yellow 19:35 19 Apr 2023


Use norm() to avoid tripping on changes to punctuation, capitalization, etc. Now needs an explicit check for a new section. --Suffusion of Yellow 18:20 3 May 2023
Use norm() to avoid tripping on changes to punctuation, capitalization, etc. Now needs an explicit check for a new section. --Suffusion of Yellow 18:20 3 May 2023


Ignore HTML comments. --Suffusion of Yellow 20:20 3 May 2023
Ignore HTML comments. --Suffusion of Yellow 20:20 3 May 2023


Ignore blanking the field (thought I fixed that already, but managed to trip the filter myself...) --Suffusion of Yellow 22:45 3 May 2023
Ignore blanking the field (thought I fixed that already, but managed to trip the filter myself...) --Suffusion of Yellow 22:45 3 May 2023


Ignore flag templates; not really a BLP issue with wrongly accusing a whole country. --Suffusion of Yellow 18:42 7 May 2023
Ignore flag templates; not really a BLP issue with wrongly accusing a whole country. --Suffusion of Yellow 18:42 7 May 2023


Exclude "in year" categories like [[:Category:Conflicts in 1849]]. --Suffusion of Yellow 18:54 7 May 2023
Exclude "in year" categories like [[:Category:Conflicts in 1849]]. --Suffusion of Yellow 18:54 7 May 2023


Check for date categories in new_wikitext, not old_wikitext, otherwise flags creation of articles about historical events. --Suffusion of Yellow 20:26 7 May 2023
Check for date categories in new_wikitext, not old_wikitext, otherwise flags creation of articles about historical events. --Suffusion of Yellow 20:26 7 May 2023
+"arrests", part of {{infobox event}}. --Suffusion of Yellow 20:24 8 May 2023
Filter conditions
Conditions:
(documentation)
page_namespace == 0 &
page_namespace == 0 &
(
(
     perpline := "(?i)(?:perp(?:etrator)?s?|assailants?|accused|convicted)\s*=[ \t]*((?=\S)[^\n<|]*)";
     perpline := "(?i)(?:perp(?:etrator)?s?|assailants?|accused|convicted|arrests)\s*=[ \t]*((?=\S)[^\n<|]*)";
    
    
     added_lines irlike perpline & (
     added_lines irlike perpline & (
         (
         (
             /* Change to the infobox */
             /* Change to the infobox */
             perp_old := get_matches(perpline, removed_lines);
             perp_old := get_matches(perpline, removed_lines);
             perp_new := get_matches(perpline, added_lines);
             perp_new := get_matches(perpline, added_lines);


             norm(perp_old[1]) != norm(perp_new[1]) &
             norm(perp_old[1]) != norm(perp_new[1]) &
             !(perp_new[1] irlike "^(?:\s*unknown\s*)?$|^\s*\{\{flag")
             !(perp_new[1] irlike "^(?:\s*unknown\s*)?$|^\s*\{\{flag")
         ) | (
         ) | (
             /* New section */
             /* New section */
             new_wikitext irlike ("==\s*" + perpline) &
             new_wikitext irlike ("==\s*" + perpline) &
             !(old_wikitext irlike ("==\s*" + perpline))
             !(old_wikitext irlike ("==\s*" + perpline))
         )
         )
     ) &
     ) &
     !(added_lines contains "<math") &
     !(added_lines contains "<math") &
     !(new_wikitext irlike "category:(?:.* in )?(?:\d{1,3}|1[0-8]\d\d|19[0-4]\d)\b")
     !(new_wikitext irlike "category:(?:.* in )?(?:\d{1,3}|1[0-8]\d\d|19[0-4]\d)\b")
) & (
) & (
     page_age;
     page_age;
     true;
     true;
)
)