[AC-2218] Ampersand renders incorrectly in view
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2013-02-06T23:22:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Alloy |
| Labels | alloy, view, xml |
| Reporter | Michael Stelly |
| Assignee | Shak Hossain |
| Created | 2012-11-09T00:05:01.000+0000 |
| Updated | 2016-03-08T07:41:12.000+0000 |
Description
Create a test file: test.xml
When this is run as an Alloy app, Label 1 renders incorrectly. Label 2 renders correctly. I expected Label 1 to output as Label 2 does. But it renders like this:
Year & Make
Attachments
| File | Date | Size |
|---|---|---|
| ampersand-fail.tiff | 2012-11-09T00:05:01.000+0000 | 126082 |
In XML, if you need an ampersand in the content of an element, you need to use the XML-safe notation:
Also, since you've indicated no styles, there's a chance they are sitting on top of each other.<Alloy> <Window fullscreen="true" id="window"> <Label>Year & Make</Label> <Label text="Year & Make"/> </Window> </Alloy>{noformat}&{noformat} didn't work for me, however {noformat}\u0026{noformat} did.
Since this is not reproducible, we are closing this.