Apostrophes in token values are displayed as &#039.

Example: Lee's Title displays as Lee&#039s Title

I made a quick patch on my local that fixes the issue. Only one line needs to be modified:

diff --git a/modules/contrib/auto_entitylabel/src/AutoEntityLabelManager.php b/modules/contrib/auto_entitylabel/src/AutoEntityLabelManager.php
index fd02809..ab90ad7 100644
--- a/modules/contrib/auto_entitylabel/src/AutoEntityLabelManager.php
+++ b/modules/contrib/auto_entitylabel/src/AutoEntityLabelManager.php
@@ -245,7 +245,7 @@ protected function generateLabel($pattern, $entity) {
     // Strip tags.
     $output = preg_replace('/[\t\n\r\0\x0B]/', '', strip_tags($output));
 
-    return $output;
+    return html_entity_decode($output, ENT_QUOTES);
   }
 
   /**
CommentFileSizeAuthor
#4 Title.png58.72 KBrenatog
#4 Config.png100.6 KBrenatog
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lee.cocklin created an issue. See original summary.

lee.cocklin’s picture

Issue summary: View changes
renatog’s picture

Assigned: Unassigned » renatog
renatog’s picture

Status: Active » Fixed
FileSize
100.6 KB
58.72 KB

Hi @leecocklin, how are you?

Thank you for the report.

We fixed this issue in the dev branch:

Soon we will launch a new release.

Thank you very much @leecocklin.

Good Work.

Regards.

brandonratz’s picture

Confirmed fix for HTML character codes in 2.x-dev. In my case, ampersand's were the culprit. & -> &

Status: Fixed » Closed (fixed)

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

benjifisher’s picture

The issue in which this was discussed is #2850962: Some characters replaced with HTML entities in tokenised labels. Look there if you want to find the patch that fixes it.

lee.cocklin’s picture

@RenatoG Thanks for the credit :)