Browse Source

- temploc remove bom

Laurent Bedubourg 18 năm trước cách đây
mục cha
commit
e9e129d1f1
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      std/mtwin/templo/Template.hx

+ 5 - 0
std/mtwin/templo/Template.hx

@@ -80,6 +80,11 @@ class Template {
 		if (id == null){
 			id = Md5.encode(src);
 		}
+	
+		// remove BOM	
+		if (StringTools.startsWith(src, "\xEF\xBB\xBF"))
+			src = src.substr(3);
+
 		src = mtwin.templo.Preprocessor.process(src);
 
 		var path = nekoSrc(id);