James 7 年 前
コミット
b122090dc0
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/main/java/com/jfinal/template/EngineConfig.java

+ 2 - 2
src/main/java/com/jfinal/template/EngineConfig.java

@@ -83,7 +83,7 @@ public class EngineConfig {
 	 * Add shared function with file
 	 */
 	public void addSharedFunction(String fileName) {
-		fileName = fileName.replaceAll("\\\\", "/");
+		fileName = fileName.replace("\\", "/");
 		// FileSource fileSource = new FileSource(baseTemplatePath, fileName, encoding);
 		ISource source = sourceFactory.getSource(baseTemplatePath, fileName, encoding);
 		doAddSharedFunction(source, fileName);
@@ -262,7 +262,7 @@ public class EngineConfig {
 			throw new IllegalArgumentException("baseTemplatePath can not be blank");
 		}
 		baseTemplatePath = baseTemplatePath.trim();
-		baseTemplatePath = baseTemplatePath.replaceAll("\\\\", "/");
+		baseTemplatePath = baseTemplatePath.replace("\\", "/");
 		if (baseTemplatePath.length() > 1) {
 			if (baseTemplatePath.endsWith("/") || baseTemplatePath.endsWith("\\")) {
 				baseTemplatePath = baseTemplatePath.substring(0, baseTemplatePath.length() - 1);