ソースを参照

- escape \r\n

Laurent Bedubourg 19 年 前
コミット
acfe76e9f2
1 ファイル変更2 行追加0 行削除
  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);