xxxxxxxxxx
$string_unicode = html_entity_decode($string);
echo preg_replace('/<p>\x{00A0}<\/p>/u', '', $string_unicode);
xxxxxxxxxx
$('p').each(function() {
var $this = $(this);
if($this.html().replace(/\s| /g, '').length == 0)
$this.remove(); });
xxxxxxxxxx
$string = "<p> </p>";
$string_unicode = html_entity_decode($string);
// $string_unicode now contains a non-breaking space unicode character
echo preg_replace('/<p>\x{00A0}<\/p>/u', 'Successfully replaced!', $string_unicode);
// Successfully replaced!