Commit dbf77782 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Avoid zero-width space in fingerprints.

Apparently, the zero-width space character causes trouble when copying
and pasting fingerprints.  Fortunately, we can let the fingerprint
break anywhere using CSS.

Fixes #17231.
parent 192af41f
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -834,10 +834,10 @@ public class ExoneraTorServlet extends HttpServlet {
    for (String[] tableRow : tableRows) {
    for (String[] tableRow : tableRows) {
      out.print("              <tr>");
      out.print("              <tr>");
      for (int i = 0; i < tableRow.length; i++) {
      for (int i = 0; i < tableRow.length; i++) {
        String attributes = "";
        String content = tableRow[i];
        String content = tableRow[i];
        if (i == 2) {
        if (i == 2) {
          content = content.substring(0, 20) + "&#8203;"
          attributes = " class=\"fingerprint\"";
              + content.substring(20, 40);
        } else if (i == 3 && content == null) {
        } else if (i == 3 && content == null) {
          content = "("
          content = "("
              + rb.getString("technicaldetails.nickname.unknown") + ")";
              + rb.getString("technicaldetails.nickname.unknown") + ")";
@@ -850,7 +850,7 @@ public class ExoneraTorServlet extends HttpServlet {
            content = rb.getString("technicaldetails.exit.no");
            content = rb.getString("technicaldetails.exit.no");
          }
          }
        }
        }
        out.print("                <td>" + content + "</td>");
        out.print("                <td" + attributes + ">" + content + "</td>");
      }
      }
      out.print("              </tr>\n");
      out.print("              </tr>\n");
    }
    }
+5 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,11 @@ body {
  margin-bottom: 15px;
  margin-bottom: 15px;
}
}


.fingerprint {
  word-break: break-all;
  word-wrap: break-word;
}

pre {
pre {
  white-space: pre-wrap;
  white-space: pre-wrap;
}
}