Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/292083
Change subject: Add a parser test for $wgNoFollowDomainExceptions functionality ...................................................................... Add a parser test for $wgNoFollowDomainExceptions functionality Verify that domains on the exception list don't get a "nofollow" attribute. Change-Id: I01a7fc0fd9ccd21069beb26dcf3f775c79e00202 --- M tests/parser/parserTest.inc M tests/parser/parserTests.txt M tests/phpunit/includes/parser/NewParserTest.php 3 files changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/292083/1 diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index c2bb78d..132743f 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -891,7 +891,7 @@ 'wgMaxTocLevel' => $maxtoclevel, 'wgCapitalLinks' => true, 'wgNoFollowLinks' => true, - 'wgNoFollowDomainExceptions' => [], + 'wgNoFollowDomainExceptions' => [ 'no-nofollow.org' ], 'wgThumbnailScriptPath' => false, 'wgUseImageResize' => true, 'wgSVGConverter' => 'null', diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 523953c..2f5450c 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -4783,6 +4783,15 @@ !! end !! test +External links: nofollow domain exception +!! wikitext +A [https://no-nofollow.org/foobar link], and another [https://example.org link]. +!! html +<p>A <a class="external text" href="https://no-nofollow.org/foobar">link</a>, and another <a rel="nofollow" class="external text" href="https://example.org">link</a>. +</p> +!!end + +!! test External image !! wikitext External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index c024555..354ddd4 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -94,7 +94,7 @@ $tmpGlobals['wgParserCacheType'] = CACHE_NONE; $tmpGlobals['wgCapitalLinks'] = true; $tmpGlobals['wgNoFollowLinks'] = true; - $tmpGlobals['wgNoFollowDomainExceptions'] = []; + $tmpGlobals['wgNoFollowDomainExceptions'] = [ 'no-nofollow.org' ]; $tmpGlobals['wgExternalLinkTarget'] = false; $tmpGlobals['wgThumbnailScriptPath'] = false; $tmpGlobals['wgUseImageResize'] = true; -- To view, visit https://gerrit.wikimedia.org/r/292083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01a7fc0fd9ccd21069beb26dcf3f775c79e00202 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits