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

Use of '&' in Page name


Go to End


2 Posts   1688 Views

Avatar
Mayuri

Community Member, 19 Posts

9 June 2008 at 9:53am

Hi all,

Have any one had used & in page name like 'News & Updates'?
I wants to give page name and navigation label as 'News & Updates', it works well with IE but in firefox and opera it gives error like;
XML Parsing Error: not well-formed
Location: http://localhost/site_mimomax/site-map/
Line Number 114, Column 56:</li><li><a href="news-updates" title="Go to the News & Updates page">News & Updates</a><ul>

It only gives error while i try to open the sitemap page. Did any one had faced same trouble?

If i comment the <!--<?xml version="1.0" encoding="utf-8"?>--> in page.ss then it works well but i need to pass code through XHTML validation.

Any suggestions?????

Avatar
Sean

Forum Moderator, 922 Posts

9 June 2008 at 2:55pm

Edited: 09/06/2008 2:56pm

Hi there,

Are you using $Title to render it out? Basically, in XHTML all ampersands must be represented as &amp; which is the HTML entity for the ampersand.

If you're rendering the title out as $Title, try using $Title.XML instead which should fix the problem.

Cheers,
Sean