summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--auto_nodetitle.module4
1 files changed, 4 insertions, 0 deletions
diff --git a/auto_nodetitle.module b/auto_nodetitle.module
index c6efb5a..7cfa67b 100644
--- a/auto_nodetitle.module
+++ b/auto_nodetitle.module
@@ -93,6 +93,10 @@ function _auto_nodetitle_patternprocessor($output, $node) {
if (module_exists('token')) {
$output = preg_replace('/[\t\n\r\0\x0B]/', '', strip_tags(token_replace($output, 'node', $node)));
}
+ // decode the HTML in the title -- we don't want Drupal to double-encode it
+ $trans = array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES));
+ $trans['''] = "'"; // PHP bug... encoding and decoding strings are different... this fixes
+ $output = strtr($output, $trans);
return $output;
}