Tested this on a clean D8 RC1 install with the git checkout of 8.x-1.x as of about 30 minutes ago. So this already includes #2584835: Title tags are double-encoded

To repro:

  • Clean D8 RC1 with only Metatags installed (no pathauto needed)
  • Add a metatag field to article. Leave all the defaults blank.
  • Create a new article.
  • Set node title to Test metatag's apostrophe handling
  • Set metatag Page Title to [node:title]
  • Save node.

Node title will show as Test metatag's apostrophe handling

Next:

  • Edit the node.
  • Change title to Test metatag’s apostrophe handling . (The apostrophe is slightly different.)
  • Save node.

Title now displays correctly.

I don't know where that other kind of apostrophe is coming from on the client site. It's not on my keyboard. Possibly it's being copied from a word processor? At any rate, the "fancy" apostrophe works but the regular one does not.

I assigned to myself because I'm still looking into it but if anyone happens to know what's going on feel free to jump in. :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Michelle created an issue. See original summary.

Michelle’s picture

The documentation of html_entity_decode() indicates that it defaults to ignoring apostrophes so passed in the parameter that includes apostrophes and it is handling apostrophes (both kinds) and double quotes properly now.

Michelle’s picture

Assigned: Michelle » Unassigned
Status: Active » Needs review

Forgot status.

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs review » Reviewed & tested by the community
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks Michelle!

DamienMcKenna’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.