title: jQuery file upload with django - getting unexpected token error
body: <p><a href="http://blueimp.github.com/jQuery-File-Upload/" rel="nofollow">Jquery file upload</a>.</p>
  
  <p>It used some kind of  javascript template language which collided with django template language, so I used the some custom template tag "raw" to produce the raw content which succeeded. But, dont know why the jquery file upload is not working. giving some unexpected token ILLEGAL error </p>
  
  <pre><code>    var second = "var _e=tmpl.encode" + tmpl.helper + ",_s='" +
                          str.replace(tmpl.regexp, tmpl.func) +
                          "';return _s;";
                          console.log("---------------------");
      console.log(second);
      console.log("-------------------");
      var f = !/[^\w\-\.:]/.test(str) ? tmpl.cache[str] = tmpl.cache[str] ||
              tmpl(tmpl.load(str)) :
                  new Function(
                      tmpl.arg + ',tmpl', second  // GETTING UNEXPECTED TOKEN HERE AT THIS PLACE.
  
                  );
  </code></pre>
  
  <p>And this is value of the variable "second" at which i am getting error :</p>
  
  <pre><code>  var _e=tmpl.encode,print=function(s,e){_s+=e&amp;&amp;(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);},_s='\n\n';for (var i=0, file; file=o.files[i]; i++) ';}\n    &lt;tr class="template-upload fade"&gt;\n        &lt;td class="preview"&gt;&lt;span class="fade"&gt;&lt;/span&gt;&lt;/td&gt;\n        &lt;td class="name"&gt;&lt;span&gt;'+_e(file.name)+'&lt;/span&gt;&lt;/td&gt;\n        &lt;td class="size"&gt;&lt;span&gt;'+_e(o.formatFileSize(file.size))+'&lt;/span&gt;&lt;/td&gt;\n        ';if (file.error) ';}\n            &lt;td class="error" colspan="2"&gt;&lt;span class="label label-important"&gt;Error&lt;/span&gt; '+_e(file.error)+'&lt;/td&gt;
      ';} else if (o.files.valid &amp;&amp; !i) ';}\n            &lt;td&gt;\n                &lt;div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"&gt;&lt;div class="bar" style="width:0%;"&gt;&lt;/div&gt;    &lt;/div&gt;\n            &lt;/td&gt;\n            &lt;td class="start"&gt;';if (!o.options.autoUpload) ';}
              &lt;button class="btn btn-primary"&gt;
                  &lt;i class="icon-upload icon-white"&gt;&lt;/i&gt;
                  &lt;span&gt;Start&lt;/span&gt;
              &lt;/button&gt;
          ';}_s+='&lt;/td&gt;
      ';} else ';}
          &lt;td colspan="2"&gt;&lt;/td&gt;
      ';}_s+='\n        &lt;td class="cancel"&gt;';if (!i) ';}
          &lt;button class="btn btn-warning"&gt;
              &lt;i class="icon-ban-circle icon-white"&gt;&lt;/i&gt;
              &lt;span&gt;Cancel&lt;/span&gt;
          &lt;/button&gt;
      ';}_s+='&lt;/td&gt;
  &lt;/tr&gt;
  ';}_s+='\n';return _s; 
  </code></pre>
  
  <p>this is the js file tmpl.js from which i got the error . </p>
  
  <p><a href="http://blueimp.github.com/JavaScript-Templates/tmpl.js" rel="nofollow">http://blueimp.github.com/JavaScript-Templates/tmpl.js</a></p>