From 789eb08b07695808f738b6fade1894bdc681940c Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 9 Apr 2020 22:51:09 -0400 Subject: URL encode the fragment link --- html.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/html.c b/html.c index e404434..f078b75 100644 --- a/html.c +++ b/html.c @@ -30,7 +30,7 @@ static const char *Mailto = { static const char *Summary = TEMPLATE(
-

[subject]

+

[subject]

[from]
@@ -41,6 +41,12 @@ static const char *Address = TEMPLATE( ); int htmlEnvelope(FILE *file, const struct Envelope *envelope) { + struct Variable fragmentVars[] = { + { "messageID", envelope->messageID }, + {0}, + }; + char *fragment = templateURL("#[messageID]", fragmentVars); + struct Variable mailtoVars[] = { { "mailbox", envelope->replyTo.mailbox }, { "host", envelope->replyTo.host }, @@ -62,6 +68,7 @@ int htmlEnvelope(FILE *file, const struct Envelope *envelope) { struct Variable summaryVars[] = { { "messageID", envelope->messageID }, + { "fragment", fragment }, { "subject", envelope->subject }, { "mailto", mailto }, { "from", from }, @@ -70,6 +77,7 @@ int htmlEnvelope(FILE *file, const struct Envelope *envelope) { {0}, }; int error = templateRender(file, Summary, summaryVars, escapeXML); + free(fragment); free(mailto); if (error) return error; -- cgit 1.4.1 rep'>log msg
Commit message (Expand)Author
2020-01-20Blood rush to my HEAD bit hot lockJune McEnroe
2020-01-20Use C syntax for Objective-C .m filesJune McEnroe
2020-01-20Add litterbox to causal.agencyJune McEnroe
2020-01-15Move mksh to Linux-onlyJune McEnroe
2020-01-15Remove gpg from install.shJune McEnroe
2020-01-15Remove git from install.shJune McEnroe
2020-01-14Highlight single-char variables nested in make interpolationsJune McEnroe
2020-01-08Set Bl -column tables to 100% widthJune McEnroe
2020-01-08Don't add dt margins to Bl-compact listsJune McEnroe
2020-01-08Use mandoc -T html for about-filterJune McEnroe
2020-01-05Add The Book of FloraJune McEnroe
2020-01-04Replace gr alias with git resetJune McEnroe
2020-01-03Remove shotty -c flag from upJune McEnroe
2020-01-03Add Darling Don't CryJune McEnroe
2020-01-01Update license header templates for the new yearJune McEnroe
2019-12-26Add \S to sort inside bracesJune McEnroe
2019-12-23Reformat music.txtJune McEnroe
2019-12-23Rename music.md to music.txtJune McEnroe
2019-12-23Add DO YOU DOUBT ME TRAITORJune McEnroe
2019-12-22Add license header to cgit CSSJune McEnroe
2019-12-22Add The Book of EttaJune McEnroe
2019-12-21Revert "Add first working version of imbox"June McEnroe
2019-12-21Add first working version of imboxJune McEnroe
2019-12-20Respect mailmap in gl pretty formatJune McEnroe
2019-12-20Set LANG in cgit filtersJune McEnroe
2019-12-20Source .editrc before applying -v or -eJune McEnroe
2019-12-20Disable signing commitsJune McEnroe
2019-12-19Ignore about-filterJune McEnroe
2019-12-19Fix matching make tags with no sourcesJune McEnroe
2019-12-19Avoid matching := assignments as tagsJune McEnroe
2019-12-18Hide line numbers when rendering mdocJune McEnroe
2019-12-18Customize cgit CSSJune McEnroe
2019-12-18Use :target rather than :focus pseudo-classJune McEnroe
2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe
2019-12-18Add git.causal.agency cgit configJune McEnroe
2019-12-18Bail from hi if input is binaryJune McEnroe
2019-12-16Post "cgit setup"June McEnroe