[tex4ht-commits] [SCM] tex4ht updated: r1443 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Tue Jan 16 13:24:54 CET 2024


Author: michal_h21
Date: 2024-01-16 12:24:53 +0000 (Tue, 16 Jan 2024)
New Revision: 1443

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
fixed support for ] in the \href command

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2024-01-15 22:00:31 UTC (rev 1442)
+++ trunk/lit/ChangeLog	2024-01-16 12:24:53 UTC (rev 1443)
@@ -1,3 +1,9 @@
+2024-01-16  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (hyperref.4ht): fixed support for the `]`
+	characters in URLs in the \href command.
+	https://tex.stackexchange.com/a/707193/2891
+
 2024-01-15  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (tcolorbox.4ht): don't use \RecallEndP in

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2024-01-15 22:00:31 UTC (rev 1442)
+++ trunk/lit/tex4ht-4ht.tex	2024-01-16 12:24:53 UTC (rev 1443)
@@ -5547,7 +5547,10 @@
       \let\HyRef at currentHtag\empty
       \Hy at colorlink{\@urlcolor}#1\Hy at endcolorlink
     \else      
-      \Link[#2]{}{}\Hy at colorlink{\@urlcolor}#1\Hy at endcolorlink\EndLink
+      % we use this trick to hide possible ] characters in the URL
+      % https://tex.stackexchange.com/a/707193/2891
+      \def\:currentlink{#2}
+      \Link[\noexpand\:currentlink]{}{}\Hy at colorlink{\@urlcolor}#1\Hy at endcolorlink\EndLink
       \global\let\hyper:normalise|=\:UnDef
     \fi
   \endgroup }



More information about the tex4ht-commits mailing list.