Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When the page's title contains special characters like single quote ("Company's Campaign"), the og:title
meta tag output by the module double-escapes those special characters, which makes the title appear as "Company's Campaign" on Facebook. The attached patch fixes this by HTML-decoding the page title received from drupal_get_title()
.
Comment | File | Size | Author |
---|---|---|---|
title-html-entities.patch | 555 bytes | jamix |
Comments
Comment #1
iSoLate CreditAttribution: iSoLate commentedTested it and it works.
Comment #2
iSoLate CreditAttribution: iSoLate commentedCode looks good too.
Comment #3
iSoLate CreditAttribution: iSoLate commentedDoesn't work with quotes.
Comment #4
iSoLate CreditAttribution: iSoLate commentedIt does work, never mind previous comment.
Comment #4.0
iSoLate CreditAttribution: iSoLate commentedGrammar fix.