Friday, August 17, 2012

Err: Dust.js - p.substr [undefined]

In android mobile browser, compiling a dust.js template caused the error "p.substr [undefined]". It worked fine in desktop browsers. The reason for the error was the closing of <input class="xyz" /> tag elements. Same in the case of img tag as well.
So writing the element like
<input type="hidden" name="someName" value="123">
<img src="pic.png" >
works fine.