There is nothing to concede. I think we have pushed all our knowledge of what works in Moodle. It is incredible that one solution works and another doesn't. I wonder if it is PHP's html_entity_decode() function or somewhere is Moodle that this discrepancy arises.
Thank you for your efforts and for suggesting the ​ which really solves my problem (for now).