labs.calibrate.be

Sanitize strings

 

Ever wanted to sanitize strings as pathauto does?

Why not let pathauto do it for you?

if (module_exists(’pathauto’)) {
// add the pathauto.inc file
require_once(drupal_get_path(’module’, ‘pathauto’) . ‘/pathauto.inc’);
$sane_string = pathauto_cleanstring(’èàé ï%’);
}

 

 

Category: 

Add new comment