0

I have a drupal 7 site, and after sharing posts to facebook, I saw strange behaviour. When I use quotes in heading, after sharing the article i see '"e; and #039, what causes this and how can I avoid it? I use addtoany drupal7 module.

Screenshot

  • I am not entirely sure about how addtoany does this, but normally Facebook fetches these previews by loading the URL it received. This also means that add to any is not the issue, but you should look for this in your site's title and opengraph tags (FB documentation). If you have any modules for these tags, look into those. The Metatag module can do Facebook open graph tags too and often works. – Neograph734 Jul 27 '17 at 10:50
0

Those are the encoded values of the characters. Before you share it to the facebook, check any hook if module is providing to decode it and then share it.

You'll have to use htmlspecialchars_decode($str); to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.