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: [guido_ch] W3 conform links

By Dave - March 18, 2009

Hi Guido,

Yes, if you see those anywhere let us know and we'll fix them.

To fix the ones that occur in cmsAdmin/viewer_functions.php just replace '&' (with single quotes) with '&amp'

Hope that helps! Let me know if that fixes it for you or if you have any other issues.
Dave Edis - Senior Developer
interactivetools.com

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