<% causing a Syntax Error

2 views
Skip to first unread message

carlin.th...@gmail.com

unread,
Jan 14, 2009, 9:45:25 AM1/14/09
to World's Simplest Code Generator
Hey there! Fantastic tool but I've managed to break it somehow. If
you put in <% if $0 %> for the substitution pattern I get
"(SyntaxError in "<% if test %>": "undefined")" (where test was the
input data). I pretty sure this is tripping up the javascript regular
expression somehow but I'm not familiar with the code but it looks
like it's tripping up this line: var m = result.match(new RegExp("<%(\
[\\s\\S\]*?)%>", 'g'));
Reply all
Reply to author
Forward
0 new messages