Skip to content

Instantly share code, notes, and snippets.

@balsama
Created December 7, 2012 15:08
Show Gist options
  • Save balsama/4233836 to your computer and use it in GitHub Desktop.
Save balsama/4233836 to your computer and use it in GitHub Desktop.
Drupal Pathauto Curly Quotes
diff --git a/pathauto.inc b/pathauto.inc
index 42290ca..fcd0276 100644
--- a/pathauto.inc
+++ b/pathauto.inc
@@ -677,6 +677,10 @@ function pathauto_punctuation_chars() {
$punctuation['greater_than'] = array('value' => '>', 'name' => t('Greater-than sign'));
$punctuation['slash'] = array('value' => '/', 'name' => t('Slash'));
$punctuation['back_slash'] = array('value' => '\\', 'name' => t('Backslash'));
+ $punctuation['double_curly_left'] = array('value' => '“', 'name' => t('Double curly left'));
+ $punctuation['double_curly_right'] = array('value' => '”', 'name' => t('Double curly right'));
+ $punctuation['single_curly_left'] = array('value' => '‘', 'name' => t('Single curly left'));
+ $punctuation['single_curly_right'] = array('value' => '’', 'name' => t('Single curly right'));
// Allow modules to alter the punctuation list and cache the result.
drupal_alter('pathauto_punctuation_chars', $punctuation);
@balsama
Copy link
Author

balsama commented Dec 7, 2012

This should apply to both the Drupal 7.x-1.0 and Drupal 6.x-2.0 versions of the module.

@balsama
Copy link
Author

balsama commented Dec 7, 2012

Adds support for the following characters:
Left Double Quotation Mark “ “
Right Double Quotation Mark ” ”
Left Single Quotation Mark ‘ ‘
Right Single Quotation Mark ’ ’

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment