W3 conform links

4 posts by 3 authors in: Forums > CMS Builder
Last Post: February 18, 2011   (RSS)

By guido_ch - March 18, 2009

Hello

Is it possible to modify some of the scripts code, that it produces W3 conform links? Right now i.e it produces "&" instead of "&" for ampersands (this happens in "per Page functions" or in search query strings for example) is there a place where I can fix that in the script code?

Cheers
Guido

Re: [Dave] W3 conform links

By pod9 - February 18, 2011

hi, my customer has raised the following issue:

"Ampersands are not being escaped properly, for example “Project & Programme Delivery” does not use & in the HTML source. This occurs on other pages using ampersand"[/#000000]

This seems to be happening in text fields and text boxes. Is there any way to solve this? Also, what problems might this cause - I'm not familiar with why it's a problem?[/#000000]
Pod9

Re: [pod9] W3 conform links

By Dave - February 18, 2011

Hi pod9,

Are you talking about page links or page content?

If it's page content you can just add htmlspecialchars() to automatically encode ampersands.

So if you have this:
<?php echo $record['title'] ?>

Change it to this:
<?php echo htmlspecialchars($record['title']) ?>

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com