labs.calibrate.be
Sanitize strings
Thu, 2010-10-14 13:45 - Steven Van den Hout
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