From 38e40047e046cd7890f21e97fd337958b0aafa96 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Thu, 12 Aug 2021 16:45:04 +0200 Subject: Apply side lock to diff headers and empty lines, too Bug: T288676 Change-Id: Ia39df2647db3c1d010e0b84f161b369f71d7a728 --- tests/phpunit/includes/diff/TextSlotDiffRendererTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/phpunit/includes/diff/TextSlotDiffRendererTest.php') diff --git a/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php b/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php index 918cf74a94f9..fb08b22a1233 100644 --- a/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php +++ b/tests/phpunit/includes/diff/TextSlotDiffRendererTest.php @@ -114,7 +114,7 @@ class TextSlotDiffRendererTest extends MediaWikiIntegrationTestCase { ]; // Preserve markers when stripping tags $diff = str_replace( '', ' ', $diff ); - $diff = str_replace( '', ' ', $diff ); + $diff = preg_replace( '@@', ' ', $diff ); $diff = preg_replace( '/data-marker="([^"]*)">/', '>$1', $diff ); return str_replace( array_keys( $replacements ), array_values( $replacements ), trim( strip_tags( $diff ), "\n" ) ); -- cgit v1.2.3