You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2015/03/05 00:18:38 UTC

[jira] [Commented] (WICKET-5849) error parsing valid HTML during AJAX refresh

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

Sven Meier commented on WICKET-5849:
------------------------------------

StyleAndScriptIdentifier wraps all inline JavaScript in CDATA, but only if their type is "text/javascript".
But your template header contribution stays untouched.

wicket-ajax-jquery.js uses the following to parse the header contribution:

    parser.parseFromString(text, "text/xml");

This fails, because entity &nbsp; is not defined in XML. If we change the second parameter to "text/html", parsing of your template will work.

We'll have to check whether that change is safe for all browers though, I've just tested it in Firefox only.

> error parsing valid HTML during AJAX refresh
> --------------------------------------------
>
>                 Key: WICKET-5849
>                 URL: https://issues.apache.org/jira/browse/WICKET-5849
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.17.0, 6.19.0
>         Environment: JDK 8u31, OS X, Chrome
>            Reporter: Nick Pratt
>            Assignee: Sven Meier
>         Attachments: myproject.tar.gz
>
>
> See attached quickstart.
> On initial page load, everything is fine - the TestPanel is parsed correctly and displayed.  Hit the link to reload the TestPanel via AJAX - wicket is getting hung up on the non breaking space {code:html}&nbsp;{code} inside the template/script definition.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)