i'm running the w3.org validator on my pages and get an error about a text value (AT&T) having an unencoded ampersand. wondering whether it would be better to encode before i save the record value or encode each time i want to display. thinking i should do it when i save because that is less frequent. what do you think?
Jan 22, 2017, 9:40 AM
Enthusiast (760 posts)
Jan 22, 2017, 9:40 AM
Post #2 of 6
Views: 8194
You are encoding & as &
----
Cheers,
Dan
Founder and CEO
LionsGate Creative
GoodPassRobot
Magelln
----
Cheers,
Dan
Founder and CEO
LionsGate Creative
GoodPassRobot
Magelln
Jan 22, 2017, 11:08 PM
Veteran / Moderator (18441 posts)
Jan 22, 2017, 11:08 PM
Post #3 of 6
Views: 8164
Hi,
It's up to you. Personally, I would leave it as &, and then only convert it when you are rendering the contents.
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!
It's up to you. Personally, I would leave it as &, and then only convert it when you are rendering the contents.
Code:
$foo =~ s/&/&/g;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!
Nov 7, 2017, 12:55 PM
Enthusiast (661 posts)
Nov 7, 2017, 12:55 PM
Post #4 of 6
Views: 7148
i am encoding only when displaying the record. so the record is stored as "Testing & Quality Assurance". i have just discovered that when i search that field for that exact match, I'm getting no matches. this is a category that i'm selecting when i enter a record so it should be exact match! can't figure out why it isn't finding. any suggestions where i should look?
Nov 8, 2017, 12:28 AM
Veteran / Moderator (18441 posts)
Nov 8, 2017, 12:28 AM
Post #5 of 6
Views: 7145
Hi,
You would need to add some debugging into the script, to try and find out what exactly it is searching for. I'm assuming this is for DBMan? If so, I don't really know the inner workings of that I'm afraid.,
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!
You would need to add some debugging into the script, to try and find out what exactly it is searching for. I'm assuming this is for DBMan? If so, I don't really know the inner workings of that I'm afraid.,
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!