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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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

rgrdz
Boris

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

rgrdz
Boris

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!