[ad_1]
First context: I’m using custom fields (field type WYSIWYG Editor) to set the meta description of certain pages, for which I’m currently using this code:
<meta name="description" content="<?php $descripcionschema0 = strip_tags(get_field(name_customfield)); $descripcionschema = str_replace('<br />', ', ', $descripcionschema0); echo preg_replace('/[^\p{L}\p{N}\s]/u', '', $descripcionschema); ?>">Now the problem is I noticed I’m getting unicode values for certain characters in the meta descriptions like double quotes. Example: “…text 8220 more text” , how can I replace all unicode values and or further improve this code?
- This topic was modified 51 minutes ago by .
