Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Changing '&' to 'and' in database (w3c validation errors)

Quote Reply
Changing '&' to 'and' in database (w3c validation errors)
& characters throwing errors during w3c validation.

So anybody tell a sql query that REPLACES & to and in category descriptions, links titles and links descriptions.

thanks in advance.

Last edited by:

hegu: May 14, 2009, 12:14 PM
Quote Reply
Re: [hegu] Changing '&' to 'and' in database (w3c validation errors) In reply to
UPDATE glinks_Links SET Description = REPLACE(Description,"&","and");
UPDATE glinks_Links SET Title = REPLACE(Title,"&","and");

..etc

(backup first though, in case it doesn't do what you want :P)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [hegu] Changing '&' to 'and' in database (w3c validation errors) In reply to
Mmmm I had same problem with w3c and these, the simplest solutions is to escape text from desired fields <%escape_html Description%> in my case Title was the problem <%escape_html Title%>

Hope that helps

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins

Last edited by:

eupos: May 15, 2009, 12:18 AM
Quote Reply
Re: [eupos] Changing '&' to 'and' in database (w3c validation errors) In reply to
eupos wrote:
Mmmm I had same problem with w3c and these, the simplest solutions is to escape text from desired fields <%escape_html Description%> in my case Title was the problem <%escape_html Title%>

Hope that helps

Where did you keep this? Can you explain a bit please?

I need to change present link descriptions and titles. So I needed a query too.
Quote Reply
Re: [hegu] Changing '&' to 'and' in database (w3c validation errors) In reply to
No I mean you can do this in templates.
Just change tag <%Title%> to <%escape_html Title%> and so on for all needed tags.

There is no database changes needed!

edit: fixed a typo

Cheers,
Boris

Facebook, Twitter and Google+ Auth for GLinks and GCommunity | reCAPTCHA for GLinks | Free GLinks Plugins

Last edited by:

eupos: May 15, 2009, 4:38 AM
Quote Reply
Re: [eupos] Changing '&' to 'and' in database (w3c validation errors) In reply to
Thanks eupos!