From 7dd8f9c17febec764d515e0e9e151ae3d6736e19 Mon Sep 17 00:00:00 2001 From: Elmar Ludwig Date: Fri, 27 Feb 2026 15:39:03 +0100 Subject: use RFC 5987 encoding when value contains `%`, fixes #6214 Closes #6214 Merge request studip/studip!4760 --- lib/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.php b/lib/functions.php index ff71ea9..df63256 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -767,7 +767,7 @@ function legacy_studip_utf8decode($data) */ function encode_header_parameter($name, $value) { - if (preg_match('/[\200-\377]/', $value)) { + if (preg_match('/[%\200-\377]/', $value)) { // use RFC 5987 encoding (ext-parameter) return $name . "*=UTF-8''" . rawurlencode($value); } else { -- cgit v1.0