Forum
Perch not escaping ampersands
Hi,
Just created a simple template as below:
<img src="<perch:content type="image" id="image" label="Image" />" alt="<perch:content id="title" type="text" label="Title" required="true" />" />
<h3><perch:content id="title" type="text" /></h3>
<perch:content id="textarea" type="textarea" label="Main text" html="true" editor="ckeditor" />
Problem is, it is outputting the below:
The ampersands aren't being escaped.
How do I escape the ampersands?
That looks like a web inspector showing the DOM. What does it look like when you view source? Is the page online somewhere?
Ah, if you view source, it shows the correct escaped &.
Sorry, I could have sworn the web inspector showed the & aswell.