I've noticed that if I use an ampersand (&) in a page title on page 5, XHTML validation breaks on page 4 and page 6 for the "previous" and "next" links at the bottom of the page because the ampersand is not being XHTML encoded by CMSMS. The rel="prev" and rel="next" links at the top of the page also do not encode the ampersand.
Can this be fixed? Can I modify my code to fix this in the meantime? Thanks.
Ampersand in page title
Re: Ampersand in page title
A quote from a search....
RonnyTo avoid problems with both validators and browsers, always use & in place of & when writing URLs in HTML
Re: Ampersand in page title
I fixed this myself by doing the following:
This was the minimum amount of editing I needed to fix my site.
Code: Select all
Edit plugins/function.cms_selflink.php
Line 383: change $name to htmlspecialchars($name)
Line 394: change $name to htmlspecialchars($name)
Line 438: change $linktext to htmlspecialchars($linktext)
Re: Ampersand in page title
Please file this as a bug report with suggested solution in the forge. The dev team can't track bugs here in the forum. They like them reported in the forge. Thanks.oliver341 wrote: I fixed this myself by doing the following:
Edit plugins/function.cms_selflink.php ...
Pierre M.
Re: Ampersand in page title
Hi, this solution doesn't work because sometimes these variable actually are meant to contain unencoded HTML. I'll put it in the correct forum all the same.