ALEXCNX Posted July 14, 2015 Share Posted July 14, 2015 Hello, I have entered products meta descriptions with single quotes, e.g. Buy 'My Products' When I am checking at the source code I see that they display with their HTML number equivalent, e.g. Buy 'My Products' How come? Link to comment Share on other sites More sharing options...
vekia Posted July 14, 2015 Share Posted July 14, 2015 string are escaped for safety purposes and to fix potential problems with "description" string construction take a look: <meta name='description' content='this is description'> now take a look how it will look like with single quotes <meta name='description' content='this is 'my text' in description'> as you can see it can brake up syntax of the content='' param, it will generate a lot of troubles. <meta name='description' content='this is 'my text' in description'> this is why strings are escaped there 1 Link to comment Share on other sites More sharing options...
ALEXCNX Posted July 14, 2015 Author Share Posted July 14, 2015 Thanks Vekia! Entering 'my text' also displays 'my text' However, curly quotes display properly. Would these be an issue ? Link to comment Share on other sites More sharing options...
vekia Posted July 14, 2015 Share Posted July 14, 2015 it's not an issue ;-) this is feature to avoid bad html syntax Link to comment Share on other sites More sharing options...
ALEXCNX Posted July 14, 2015 Author Share Posted July 14, 2015 Ok I will replace them with curly quotes then. I wish I had known (and checked) this earlier as it's going to take me 16 years to replace them all. Thanks again :-) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now