After http://drupal.org/node/185304 some people may still want that reduction of letters to the subset "ascii96" characters represented by something similar to this preg_replace pattern:

    // Preserve alphanumerics and forward slashes, everything else becomes a separator.
    $pattern = '/[^a-zA-Z0-9\/]+/ ';
    $output = preg_replace($pattern, $separator, $output);

It would need to be expanded to accept all punctuation since we now have the punctuation control.

CommentFileSizeAuthor
#1 ascii96_reduction.patch2.28 KBgreggles

Comments

greggles’s picture

Status: Postponed » Needs review
StatusFileSize
new2.28 KB

Ok - here is the patch.

I decided against trying to handle punctuation for now.

If someone wants that they can figure out the regex (yikes).

greggles’s picture

Status: Needs review » Fixed

applied to both 5.x and MAIN.

hass’s picture

Category: feature » bug
Status: Fixed » Active

Reducing to ASCII128 or ASCII96? The wording is different for the form element and the code comment...

+  // Reduce to the subset of ASCII128 letters and numbers

+  $form["general"]["pathauto_reduce_ascii"] = array('#type' => 'checkbox',
+    '#title' => t('Reduce strings to letters and numbers from ASCII-96'),
+    '#default_value' => variable_get('pathauto_reduce_ascii', FALSE),
+    '#description' => t("Filters the new alias to only letters and numbers found in the ASCII-96 set."),
+  );
greggles’s picture

Status: Active » Fixed

Thanks for catching that. I took the opportunity to clean up some other comments as well.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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