[tor-commits] [atlas/master] Uses pre elements for fingerprints in details view, not tt (Fixes: #21350)

irl at torproject.org irl at torproject.org
Tue Jan 31 00:26:33 UTC 2017


commit 4627254904953d0ba9c02d0cf767472d10b78acc
Author: Iain R. Learmonth <irl at fsfe.org>
Date:   Tue Jan 31 00:21:47 2017 +0000

    Uses pre elements for fingerprints in details view, not tt (Fixes: #21350)
    
    Comment from cypherpunks: "It reverts the solution from #12685 because <pre>
    tags wrap their content automatically. However, using the <pre> tag changes the
    fingerprint to look like the fingerprints of the family members (except with
    black text instead of blue or orange). IMO this is preferable because it makes
    displaying fingerprints consistent but thought I'd mention it anyway."
    
    In testing, I found this to actually be a better solution for responsiveness as
    instead of wrapping at a fixed location, everything can still be viewable even
    with a 160px wide screen. This does lead to having different length lines when
    wrapping, and I guess user feedback will let us know if this was a dreadful
    idea, but I don't see it causing disasterous breakage for anyone.
---
 templates/details/router.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/details/router.html b/templates/details/router.html
index d94f5cf..f87001f 100644
--- a/templates/details/router.html
+++ b/templates/details/router.html
@@ -72,7 +72,7 @@
     <% } %>
 
     <dt><span class="tip" data-content="20-byte unique identifier of the relay." data-original-title="Fingerprint">Fingerprint</span></dt>
-    <dd><tt><%= relay.get('fingerprint').replace(/(.{20})/g,"$1​") %></tt></dd>
+    <dd><pre><%= relay.get('fingerprint') %></pre></dd>
 
     <dt><span class="tip" data-content="Flags that the directory authorities assigned to this relay." data-original-title="Relay flags">Flags</span></dt>
     <dd><% _.each(relay.get('flags'), function(flag) { %>



More information about the tor-commits mailing list