Fossil SCM

Fix the chref() helper function so that it correctly renders the class attribute on the generated hyperlink with hyperlink display is delayed as an anti-robot defense.

drh 2019-01-26 02:26 trunk
Commit f54b4bf1bd764ef7dce791feb3956a5037b9fa4ac8e5ee18c5bdcb673c132c66
1 file changed +1 -1
+1 -1
--- src/style.c
+++ src/style.c
@@ -156,11 +156,11 @@
156156
va_list ap;
157157
va_start(ap, zFormat);
158158
zUrl = vmprintf(zFormat, ap);
159159
va_end(ap);
160160
if( g.perm.Hyperlink && !g.javascriptHyperlink ){
161
- char *zHUrl = mprintf("<a %s href=\"%h\">", zExtra, zUrl);
161
+ char *zHUrl = mprintf("<a class=\"%s\" href=\"%h\">", zExtra, zUrl);
162162
fossil_free(zUrl);
163163
return zHUrl;
164164
}
165165
needHrefJs = 1;
166166
return mprintf("<a class='%s' data-href='%z' href='%R/honeypot'>",
167167
--- src/style.c
+++ src/style.c
@@ -156,11 +156,11 @@
156 va_list ap;
157 va_start(ap, zFormat);
158 zUrl = vmprintf(zFormat, ap);
159 va_end(ap);
160 if( g.perm.Hyperlink && !g.javascriptHyperlink ){
161 char *zHUrl = mprintf("<a %s href=\"%h\">", zExtra, zUrl);
162 fossil_free(zUrl);
163 return zHUrl;
164 }
165 needHrefJs = 1;
166 return mprintf("<a class='%s' data-href='%z' href='%R/honeypot'>",
167
--- src/style.c
+++ src/style.c
@@ -156,11 +156,11 @@
156 va_list ap;
157 va_start(ap, zFormat);
158 zUrl = vmprintf(zFormat, ap);
159 va_end(ap);
160 if( g.perm.Hyperlink && !g.javascriptHyperlink ){
161 char *zHUrl = mprintf("<a class=\"%s\" href=\"%h\">", zExtra, zUrl);
162 fossil_free(zUrl);
163 return zHUrl;
164 }
165 needHrefJs = 1;
166 return mprintf("<a class='%s' data-href='%z' href='%R/honeypot'>",
167

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button