Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Problems when Content has an ampersand (&)

Go to End

4 Posts   2180 Views


Community Member, 17 Posts

4 December 2009 at 12:10pm

Hi all,

I'm having a problem whenever my client uses an & in the content of a post I get a Parsing error like to one below.

XML Parsing Error: not well-formed
Line Number 217, Column 48:Text containing an & some where

Does anyone have any ideas of how I can fix this?
Any help greatly appreciated.



Community Member, 67 Posts

4 December 2009 at 12:32pm

I think you have to be a little more specific about the nature of the page in question. Is it a form? The broswer would normally escape any ampersands in the form data, so this is a little puzzling.


Community Member, 17 Posts

4 December 2009 at 12:57pm

No, it's not a form, it's just in an ArticlePage.


Community Member, 283 Posts

4 December 2009 at 4:33pm

Edited: 04/12/2009 4:35pm

This is a content issue being thrown by your browser (not SilverStripe), your page is being generated with an XHTML doctype but the content being generated isn't fully compliant. It should be outputting the html entity instead of a raw ampersand




Firefox 3.5 and IE 8 will both choke on this. You need to fix the markup or change your doctype to HTML transitional, unless anyone has a better solution?