Help how to remove double quotes unicode values and other unicode values?

[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 snippet24.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer