Jump to content

single quotes in meta descriptions display as '


Recommended Posts

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

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

 

 

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...