https://bugzilla.wikimedia.org/show_bug.cgi?id=21816

           Summary: more agressive norm()
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: AbuseFilter
        AssignedTo: agarr...@wikimedia.org
        ReportedBy: martijnhoeks...@gmail.com
                CC: wikibugs-l@lists.wikimedia.org


norm() currently behaves as rmwhitespace(rmspecials(rmdoubles(ccnorm(arg1))))

this has the drawback that whitespace is removed last. With fairly common
vandalism edits, we have stuff like
  "G  G G G GAY!". If doubles are removed before repetition is removed, the
list of G's are unrecognised. I propose to either change

        $s = $this->ccnorm( $s );
        $s = $this->rmdoubles( $s );
        $s = $this->rmspecials( $s );
        $s = $this->rmwhitespace( $s );

to

        $s = $this->ccnorm( $s );
        $s = $this->rmspecials( $s );
        $s = $this->rmwhitespace( $s );
        $s = $this->rmdoubles( $s );

or to make a new function agrNorm() (for agressive norm) that mimics the
behaviour of norm, but with the second operation order, not to break backwards
compatibility.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to