I have a formatted text field using the basic_html filter, which is set up like this:
It is removing HTML unicode entities, in the format
&#x<hex>; for example, the Euro symbol is
€ which becomes .
If I call
$node->get('field_my_field') then I see the values is an array like:
$values = [ 'value' => 'Content\n<br />Example content: €65', 'format' => 'basic_html', ];
So at some point when it goes through check_markup(), this entity is being turned into a Unicode character which is then for some reason invisible on the page.
I've tried all sorts of messing around with html_entity_decode() and htmlspecialchars() but just end up breaking the HTML tags. I'm not sure what I can do other than a str_replace() of all possible entities I think might occur.