My title text has this character | and hence twitter share isn't working.
https://twitter.com/intent/tweet?text=Wall%20Clock%20|%20by%20BestPlace%20http://www.example.com/wall-clock&hashtags=BestPlace
This is the PHP code:
<a href="https://twitter.com/intent/tweet?text=<?php echo $heading_title; ?>%20<?php echo 'http://'. $_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI'];?>&hashtags=fufuh" target="_blank" class="btn btn-default">
Share Twitter
</a>
How do I replace or remove | from the text so twitter would load it properly?