Haim Evgi
Haim Evgi

Reputation: 125674

meta description quotes escape

html code meta tag description,

it is generated dynamically and we have quotes in the description part and search engines didn't read everything.

it shows until the quotes begins in the search results

how to deal with it ?

thanks

Upvotes: 25

Views: 20541

Answers (2)

Jan Bludau
Jan Bludau

Reputation: 319

In PHP use strip_tages + str_replace('"',"&quot") to archiv

<meta name="description" content="&quot;quoted content&quot;">

Upvotes: 1

Gumbo
Gumbo

Reputation: 655835

You need to escape the quotes using HTML character references:

<meta name="description" content="&quot;quoted content&quot;">

The description here is "quoted content".

Upvotes: 46

Related Questions