You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jason Novotny (JIRA)" <ji...@apache.org> on 2013/11/04 22:36:21 UTC

[jira] [Commented] (WICKET-5405) Unxpected tocken % in wicket-ajax.js due to template js inclusion

    [ https://issues.apache.org/jira/browse/WICKET-5405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13813312#comment-13813312 ] 

Jason Novotny commented on WICKET-5405:
---------------------------------------

According to the docs, I managed to use a different character than "%" by modifying templ.js.min as per https://github.com/blueimp/JavaScript-Templates



> Unxpected tocken % in wicket-ajax.js due to template js inclusion
> -----------------------------------------------------------------
>
>                 Key: WICKET-5405
>                 URL: https://issues.apache.org/jira/browse/WICKET-5405
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.10
>         Environment: Mac OS X, java 1.7, wicket 1.5.10
>            Reporter: Jason Novotny
>
> I'm including some javascript templates https://github.com/blueimp/JavaScript-Templates in my wicket page, that looks like:
> <script id="template-upload" type="text/x-tmpl">
> {% for (var i=0, file; file=o.files[i]; i++) { %}
>     <tr class="template-upload fade">
> ....
> And due to the "%" in the template js script, I get:
> Uncaught SyntaxError: Unexpected token % 
> This occurs in the wicket-ajax.js code at this segment:
> // Adds the element to page head
> Wicket.Head.addElement = function(element) {
> 	var head = document.getElementsByTagName("head");
> 	if (head[0]) {
> 		head[0].appendChild(element);
> 	}
> }



--
This message was sent by Atlassian JIRA
(v6.1#6144)