Forum
Problem with HTML entities
Hi,
I'm having an issue with html entities in my text blocks. When I first type an entity in, it is immediately replaced with the entity it represents inside the editor. For example, ® (&-r-e-g-;) is replaced with an r within a circle. I save it, it shows up fine on the site. Later, however, without anyone changing it, perch starts to display a weird character in front of it on the site.
In addition, sometimes it completely ignores the entities all together and just leaves them in their expanded ampersand form.
I changed the text block template by adding html="true". I thought that would help, but apparently not. Any idea how to fix this?
Thank you.
Bill
Which editor are you using?
I'm using the default one that ships with Perch.
Can you show me your template tag?
<perch:content id="text" type="textarea" label="Text" markdown="true" editor="markitup" imagewidth="640" imageheight="480" html="true" />
I guess it would be the markitup editor.
Are you serving your pages as UTF8?
I don't think I'm explicitly setting it to UTF-8, but we are going to have several languages, so I probably should. Would that help?
I'm not sure exactly what problem you're seeing, but if you're getting "weird characters" that would likely help.
Thank you. I am now serving the pages as UTF-8 and will monitor.