Help how to remove double quotes unicode values and other unicode values?
-
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?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Help how to remove double quotes unicode values and other unicode values?’ is closed to new replies.