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

Andrea Del Bene commented on WICKET-6505:
-----------------------------------------

Sorry, I didn't get your question. By default special characters are escaped, 
that's why your '&' are turned to '&'. If you invoke 
setEscapeModelStrings(false) on your label your unit test passes. The code of 
your homepage should be like this:


{code:java}
public HomePage(final PageParameters parameters) {
        super(parameters);
        Label label = new Label("test", "&&&&&");
        label.setEscapeModelStrings(false);
        add(label);
}
{code}


> AssertLabel in Wicket Tester doesn't work with "&"
> --------------------------------------------------
>
>                 Key: WICKET-6505
>                 URL: https://issues.apache.org/jira/browse/WICKET-6505
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 8.0.0-M8
>            Reporter: Ɓukasz Ludwa
>            Assignee: Andrea Del Bene
>         Attachments: myproject.zip
>
>
> Adding following label works property:
> {code:java}
> add(new Label("test", "&&&&&"));
> {code}
> But in ensuing test case fails:
> {code:java}
> tester.assertLabel("test", "&&&&&");
> {code}
> Giving incoming difference:
> {noformat}
> Expected :&&&&&
> Actual   :&&&&&
> {noformat}
> Seems like problem with this html special character.
> I attached Wicket Quick Start project  with this problem.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to