]> the.earth.li Git - onak.git/commitdiff
Always put a leading 0x on keyids in HTML output links
authorJonathan McDowell <noodles@earth.li>
Sun, 1 Apr 2012 21:27:11 +0000 (14:27 -0700)
committerJonathan McDowell <noodles@earth.li>
Sun, 1 Apr 2012 21:27:11 +0000 (14:27 -0700)
  We didn't always put a leading 0x when outputting URLs as part of
  an index, which confuses some clients that try to autoparse returned
  key IDs.

keyindex.c

index 4eedf1f648f9f107c85c22ecb799d04af8b5f6a1..45606f0d50fb5f1e206736ebf84dca60ed657074 100644 (file)
@@ -53,7 +53,7 @@ int list_sigs(struct openpgp_packet_list *sigs, bool html)
                }
                if (html && uid != NULL) {
                        printf("%s         <a href=\"lookup?op=get&"
-                               "search=%016" PRIX64 "\">%08" PRIX64
+                               "search=0x%016" PRIX64 "\">%08" PRIX64
                                "</a>             "
                                "<a href=\"lookup?op=vindex&search=0x%016"
                                PRIX64 "\">%s</a>\n",
@@ -297,7 +297,7 @@ int key_index(struct openpgp_publickey *keys, bool verbose, bool fingerprint,
 
                if (html) {
                        printf("pub  %5d%c/<a href=\"lookup?op=get&"
-                               "search=%016" PRIX64 "\">%08" PRIX64
+                               "search=0x%016" PRIX64 "\">%08" PRIX64
                                "</a> %04d/%02d/%02d ",
                                length,
                                typech,