Ejemplo n.º 1
0
 /* Metoda przygotowuje wpisaną wypowiedź użytkownika do wprowadzenia do bazy
  * @param text string który zostanie zmodyfikowany
  * @return Zmodyfikowany String
  */
 public static String wypowiedzDoBazy(String text) {
   text = text.replaceAll("&", "&");
   text = text.replaceAll("<", "&lt;");
   text = text.replaceAll(">", "&gt;");
   text = text.replaceAll("\"", "&quot;");
   text = text.replaceAll("'", "&#39;"); // \\\\'");
   text = text.replaceAll("\r\n", "<br/>");
   text = text.replaceAll("\n", "<br/>");
   text = Commons.dodajEmotikonki(text);
   return text;
 }