diff --git a/src/main/java/com/samskivert/mustache/Mustache.java b/src/main/java/com/samskivert/mustache/Mustache.java
index a6c3aac..6ebec9d 100644
--- a/src/main/java/com/samskivert/mustache/Mustache.java
+++ b/src/main/java/com/samskivert/mustache/Mustache.java
@@ -57,11 +57,11 @@ public class Mustache
}
/**
- * Returns a compiler that does not escape HTML by default.
+ * Returns a compiler that escapes HTML by default.
*/
public static Compiler compiler ()
{
- return new Compiler(false);
+ return new Compiler(true);
}
/**
diff --git a/src/test/java/com/samskivert/mustache/MustacheTest.java b/src/test/java/com/samskivert/mustache/MustacheTest.java
index b83c3d7..2183052 100644
--- a/src/test/java/com/samskivert/mustache/MustacheTest.java
+++ b/src/test/java/com/samskivert/mustache/MustacheTest.java
@@ -114,9 +114,10 @@ public class MustacheTest
}
@Test public void testEscapeHTML () {
- assertEquals("", Mustache.compiler().compile("{{a}}").execute(context("a", "")));
- assertEquals("<b>", Mustache.compiler().escapeHTML(true).
- compile("{{a}}").execute(context("a", "")));
+ assertEquals("<b>", Mustache.compiler().compile("{{a}}").
+ execute(context("a", "")));
+ assertEquals("", Mustache.compiler().escapeHTML(false).compile("{{a}}").
+ execute(context("a", "")));
}
protected void test (String expected, String template, Object ctx)