[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [doctor/java] Replace <br> with newline in relay list and format with CSS.



commit ea9196ead7f06176bd2860102b43947d9166b662
Author: Michael Wolf <mikewolf@xxxxxxxxxx>
Date:   Sun Apr 20 03:39:29 2014 -0400

    Replace <br> with newline in relay list and format with CSS.
    
    * Implements part 4 of ticket #11563
---
 src/org/torproject/doctor/MetricsWebsiteReport.java |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/org/torproject/doctor/MetricsWebsiteReport.java b/src/org/torproject/doctor/MetricsWebsiteReport.java
index f6f59f8..28d9e9a 100644
--- a/src/org/torproject/doctor/MetricsWebsiteReport.java
+++ b/src/org/torproject/doctor/MetricsWebsiteReport.java
@@ -130,6 +130,9 @@ public class MetricsWebsiteReport {
         +       "height:3em;\n"
         +       "vertical-align:bottom;\n"
         +     "}\n"
+        +     "#relay-list td {\n"
+        +       "white-space:pre;\n"
+        +     "}\n"
         +   "</style>\n"
         +     "<div class=\"center\">\n"
         +       "<div class=\"main-column\">\n"
@@ -678,7 +681,7 @@ public class MetricsWebsiteReport {
         +         "</ul>\n"
         +         "<br>\n"
         +         "<table border=\"0\" cellpadding=\"4\" "
-        + "cellspacing=\"0\" summary=\"\">\n"
+        + "cellspacing=\"0\" id=\"relay-list\" summary=\"\">\n"
         +           "<colgroup>\n"
         +             "<col width=\"120\">\n"
         +             "<col width=\"80\">\n");
@@ -759,7 +762,7 @@ public class MetricsWebsiteReport {
         this.bw.write("<td>");
         int flagsWritten = 0;
         for (String flag : relevantFlags) {
-          this.bw.write(flagsWritten++ > 0 ? "<br>" : "");
+          this.bw.write(flagsWritten++ > 0 ? "\n" : "");
           if (flags.contains(flag)) {
             if (consensusFlags == null ||
               consensusFlags.contains(flag)) {

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits