I work in an IT department at a museum whose website is built on Drupal. I have experience with other CMSs, but I've only worked with Drupal a little bit. So far, I've been able to help them fix quite a few bugs with their site, but I can't find any information on how to resolve this particular one. On any content type, if the Title field has a special character it displays the character correctly on the site, but if it's linked to on Facebook and it pulls the title, it ends up showing the entity number instead.

An example:

Science Movie Night: The Shaman's Apprentice


Science Movie Night: The Shaman's Apprentice

I've searched around, but I haven't found anything talking about how to combat this.


I just checked with Drupal 7, and it will replace Unicode Character 'APOSTROPHE' with its NCR equivalent (') in headings. This is not a bug, but a security measure.

Apperently, when FaceBook receives this, it changes it to &#39, with the result you observe. IMHO, this is a bug in how Facebook treats incoming NCRs, and has nothing to do with Drupal. (It is not a good idea for Drupal to have plain apostrophes in headings.) You may want to report this bug to Facebook, but it will probably not be their top priority.

You may also add a feature request to the authors of the module the sites uses to interact with FaceBook, asking it to rewrite NCR apostrophes into a single byte ASCII before sending to FaceBook. They may be more symphatetic.

(Btw: This problem has already been mentioned on stackoverflow: https://stackoverflow.com/questions/11821400/apostrophes-turns-crazy-on-facebook-app - but I'm pretty sure the upvoted answer is hokum.)

  • You could also use open graph metatags to set an alternative title for facebook. Apr 10 '14 at 2:19

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.