From 98015907f2a3b96c01a267a2d25a1529f415ac43 Mon Sep 17 00:00:00 2001 From: autoantwort <41973254+autoantwort@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:21:13 +0100 Subject: [PATCH] Ignore casing when processing markdown fragments + check for percent encoded ancors (#1535) We must also check the fragment before it is percent-decoded as required by the HTML standard. Fixes https://github.com/lycheeverse/lychee/issues/1467 --- fixtures/fragments/file.html | 13 +++++++++---- fixtures/fragments/file1.md | 10 ++++++++++ lychee-bin/tests/cli.rs | 8 ++++---- lychee-lib/src/extract/markdown.rs | 5 +++-- lychee-lib/src/utils/fragment_checker.rs | 18 ++++++++++++++---- 5 files changed, 40 insertions(+), 14 deletions(-) diff --git a/fixtures/fragments/file.html b/fixtures/fragments/file.html index db98b3af58..5ff181f737 100644 --- a/fixtures/fragments/file.html +++ b/fixtures/fragments/file.html @@ -5,8 +5,9 @@
+
+ Word
+ back we go upper does not work
+ id with percent encoding
+ back to Upper-ÄÖö
+ back to öüä encoded
+ doesn't exist