소스 검색

- 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);