diff --git a/M2/Macaulay2/m2/html.m2 b/M2/Macaulay2/m2/html.m2 index 414dbba9911..cba229797f6 100644 --- a/M2/Macaulay2/m2/html.m2 +++ b/M2/Macaulay2/m2/html.m2 @@ -203,7 +203,8 @@ percentEncoding = new MutableHashTable from toList apply( -- unreserved characters from RFC 3986 -- ALPHA / DIGIT / "-" / "." / "_" / "~" -- we also add "/" and ":" since they're standard URL characters - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890-._~/:", + -- also "#" for named anchors + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890-._~/:#", c -> (c, c)) -- everything else will be percent encoded and added to the hash table -- as needed diff --git a/M2/Macaulay2/packages/Macaulay2Doc/functions/urlEncode-doc.m2 b/M2/Macaulay2/packages/Macaulay2Doc/functions/urlEncode-doc.m2 index eab65b879e4..fcdb1a600aa 100644 --- a/M2/Macaulay2/packages/Macaulay2Doc/functions/urlEncode-doc.m2 +++ b/M2/Macaulay2/packages/Macaulay2Doc/functions/urlEncode-doc.m2 @@ -13,7 +13,7 @@ doc /// :String Description Text - Encode all of the characters in a URL except for "/", ":", and + Encode all of the characters in a URL except for "/", ":", "#", and the "unreserved characters" specified by @HREF{"https://www.rfc-editor.org/rfc/rfc3986.html", "RFC 3986"}@, i.e., the alphanumeric characters, "-", ".", "_", and "~", using