spullara/mustache.java — Issue #11: Parsing a broken template doesn't throw exceptions
Author: talios
Created: 2011-11-24 01:23:17+00:00
State: open

I just tried using the MustacheBuilder deliberately passing a broken template for a test case and noticed the the #parse method never failed, calling:

new MustacheBuilder().parse("This is {{broken");

quite happily returns a Mustache object.

Is it correct that this doesn't fail? If the intent of the caller was that they WANTED the {{broken to be rendered, should the {{ be escaped? Or do we need some form of Strict mode for the parser?