From 98459aa268fde21eb64dacf0e2350727b30f5e38 Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Fri, 11 Oct 2024 17:42:05 +0200 Subject: [PATCH 1/2] Encode URL properly (lobid-gnd#408) Question marks weren't encoded. It's better to use a library. --- gatsby/lobid/static/imagesproxy.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gatsby/lobid/static/imagesproxy.php b/gatsby/lobid/static/imagesproxy.php index a6154e3..3d4e1e3 100644 --- a/gatsby/lobid/static/imagesproxy.php +++ b/gatsby/lobid/static/imagesproxy.php @@ -1,10 +1,13 @@ From 6f891a35de71263b6e3409228f7d09416385fd80 Mon Sep 17 00:00:00 2001 From: Pascal Christoph Date: Mon, 14 Oct 2024 14:18:03 +0200 Subject: [PATCH 2/2] Preserve the query parameter (lobid-gnd#408) The PHP parse-url function cannot be used to separate "URL path" and "URL query" because if an "?" is part of the path it would be nontheless identified as a query parameter. Explicitly stick to the last "?" seems to be safe in the context of wikimedia commmons at least. --- gatsby/lobid/static/imagesproxy.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gatsby/lobid/static/imagesproxy.php b/gatsby/lobid/static/imagesproxy.php index 3d4e1e3..8412386 100644 --- a/gatsby/lobid/static/imagesproxy.php +++ b/gatsby/lobid/static/imagesproxy.php @@ -1,8 +1,18 @@