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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

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

using ampersand in nav label


Go to End


4 Posts   3707 Views

Avatar
Colin

Community Member, 15 Posts

14 August 2007 at 4:33pm

I have noticed that if I use an ampersand in the Page name, even though the page title and the actual page filename are fine, I get an XML parsing error because it is not properly encoded as & in the navigation label field. It would be nice of the system caught this prior to publishing.

Avatar
Colin

Community Member, 15 Posts

14 August 2007 at 5:21pm

Andy: Thanks! Are there any other side effects or gotchas by doing this? If not, why is this not default?

Avatar
Sean

Forum Moderator, 922 Posts

14 August 2007 at 5:44pm

Hmm, I thought $Title was supposed to render the raw text as XML safe text anyway? Perhaps this needs to be fixed?

Sean

Avatar
Colin

Community Member, 15 Posts

15 August 2007 at 12:39am

Just to be clear, my issue is not with the Title or Page Name fields, but with the Navigation Label field. It is the unescaped ampersand in the nav unordered list that is causing the XML error.

I have fixed it in my site by escaping it; however, it seems that the field should be made XML safe text by default.