From ccbcbbc21cd1ca19e32eb2f1e0953edd27fd8f17 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Fri, 1 Nov 2024 10:53:11 +0100 Subject: [PATCH] fix: Generate correct links to tags in Atom feeds In the feeds, the links to tags were in the form of `/links?q=#tag`. Most of the aggregators are able to rebuild the correct link by using the feed domain as the base URL. But it didn't work when the feeds were generated with the `direct=true` parameter because the base URL wasn't the one to Flus. Now, the tags links are always generated in an absolute form to avoid this issue (even in the interface because it was easier to patch). --- src/utils/MiniMarkdown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/MiniMarkdown.php b/src/utils/MiniMarkdown.php index 696502c3..8f9123a4 100644 --- a/src/utils/MiniMarkdown.php +++ b/src/utils/MiniMarkdown.php @@ -64,7 +64,7 @@ protected function inlineTag(array $excerpt): ?array if ($result) { $tag = $matches['tag']; - $tag_url = \Minz\Url::for('links', [ + $tag_url = \Minz\Url::absoluteFor('links', [ 'q' => "#{$tag}", ]);