Răsfoiți Sursa

- escape \r\n

Laurent Bedubourg 19 ani în urmă
părinte
comite
acfe76e9f2
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      std/mtwin/text/Text2Xhtml.hx

+ 2 - 0
std/mtwin/text/Text2Xhtml.hx

@@ -133,6 +133,8 @@ class Text2Xhtml {
 	}
 
 	public function transform( str:String ) : String {
+		str = StringTools.replace(str, "\r\n", "\n");
+		str = StringTools.replace(str, "\r", "\n");
 		str = StringTools.htmlEscape(str);
 
 		var helper = new StringHelper(str);