Merge "Improve coverage for AbuseFilterTokenizer"

This commit is contained in:
jenkins-bot 2018-09-09 12:30:49 +00:00 committed by Gerrit Code Review
commit 121df619da
3 changed files with 7 additions and 2 deletions

View file

@ -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 );

View file

@ -259,6 +259,7 @@ class AbuseFilterTokenizer {
$offset += 2;
} else {
// Should never happen
$token .= $code[$offset];
$offset++;
}

View file

@ -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"