mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
Merge "Improve coverage for AbuseFilterTokenizer"
This commit is contained in:
commit
121df619da
|
@ -209,7 +209,6 @@ class AFComputedVariable {
|
|||
if ( $article->getContentModel() === CONTENT_MODEL_WIKITEXT ) {
|
||||
$textVar = $parameters['text-var'];
|
||||
|
||||
// XXX: Use prepareContentForEdit. But we need a Content object for that.
|
||||
$new_text = $vars->getVar( $textVar )->toString();
|
||||
$content = ContentHandler::makeContent( $new_text, $article->getTitle() );
|
||||
$editInfo = $article->prepareContentForEdit( $content );
|
||||
|
|
|
@ -259,6 +259,7 @@ class AbuseFilterTokenizer {
|
|||
$offset += 2;
|
||||
|
||||
} else {
|
||||
// Should never happen
|
||||
$token .= $code[$offset];
|
||||
$offset++;
|
||||
}
|
||||
|
|
|
@ -1 +1,6 @@
|
|||
"a\tb" = "a b" & "a\qb" = "a\qb"
|
||||
"a\tb" === "a b" &
|
||||
"a\qb" === "a\qb" &
|
||||
"a\"b" === 'a"b' &
|
||||
"a\rb" !== "a\r\nb" &
|
||||
"\x66\x6f\x6f" === "foo" &
|
||||
"some\xstring" === "somexstring"
|
||||
|
|
Loading…
Reference in a new issue