From be012ced04882b9c360f098b9f3f78a0ef1619c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 29 Nov 2022 18:15:16 +0100 Subject: [PATCH] Only match article path until first '?' when parsing links Bug: T324028 Change-Id: I7aca1a8f20695b9ecd3f63f2d0a3f5684616655e --- includes/CommentUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/CommentUtils.php b/includes/CommentUtils.php index 922bca0ba..3ac2059a3 100644 --- a/includes/CommentUtils.php +++ b/includes/CommentUtils.php @@ -494,7 +494,7 @@ class CommentUtils { $articlePathRegexp = '/' . str_replace( preg_quote( '$1', '/' ), - '(.*)', + '([^?]*)', preg_quote( $config->get( 'ArticlePath' ), '/' ) ) . '/'; $matches = null;