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.
Apostrophes in token values are displayed as '.
Example: Lee's Title displays as Lee's 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);
}
/**
Comment | File | Size | Author |
---|
Comments
Comment #2
lee.cocklin CreditAttribution: lee.cocklin commentedComment #3
renatogComment #4
renatogHi @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.
Comment #5
brandonratz CreditAttribution: brandonratz as a volunteer commentedConfirmed fix for HTML character codes in 2.x-dev. In my case, ampersand's were the culprit.
&
-> &Comment #7
benjifisherThe 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.
Comment #8
lee.cocklin CreditAttribution: lee.cocklin commented@RenatoG Thanks for the credit :)