Explorar el Código

- escape \r\n

Laurent Bedubourg hace 19 años
padre
commit
acfe76e9f2
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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);