-2

From my site on WP i send to Telegram chat new posts, I use get_the_title(), but if in the title have dash " - " in Telegram chat this displayed as – How this fix?

Nazar
  • 11
  • 5

1 Answers1

0

It is HTML entity. You can use html_entity_decode to unescape it.

echo html_entity_decode('–'); // outputs "–"
Jax-p
  • 7,225
  • 4
  • 28
  • 58