Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Escape a submodule link's class like the others
Diffstat (limited to 'source/ui-shared.c')
-rw-r--r--source/ui-shared.c12
1 file changed, 6 insertions, 6 deletions
diff --git a/source/ui-shared.c b/source/ui-shared.c
index 687b773..acd50f0 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -1265,10 +1265,7 @@ void cgit_submodule_link(const char *class, char *path, const char *rev)
name = name ? name + 1 : path;
if (item || ctx.repo->module_link || module) {
- html("<a ");
- if (class)
- htmlf("class='%s' ", class);
- html("href='");
+ open_link(NULL, class);
if (item) {
const char *args[] = { rev };
emit_module_link(item->util, args, 1);
@@ -1283,8 +1280,11 @@ void cgit_submodule_link(const char *class, char *path, const char *rev)
html("</a>");
} else {
html("<span");
- if (class)
- htmlf(" class='%s'", class);
+ if (class) {
+ html(" class='");
+ html_attr(class);
+ html("'");
+ }
if (tooltip) {
html(" title='");
html_attr(tooltip);