code: public static String makeLinear (String text)
      {
          if (text == null) {
              return text;
          }
          // handle both line ending formats
          text = text.replace("\n", "<br>\n");
          return text;
      }
docs: Inserts a {@code <br>} tag before every newline.