Forum

Thread tagged as: Error

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

William Richards

William Richards 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which editor are you using?

I'm using the default one that ships with Perch.

Drew McLellan

Drew McLellan 2638 points
Perch Support

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.

Drew McLellan

Drew McLellan 2638 points
Perch Support

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?

Drew McLellan

Drew McLellan 2638 points
Perch Support

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.