Login!
Lost password?
 

MODx Bug/Feature Tracker and Feature Requests

Welcome to the MODx CMS Tracker. Please choose the appropriate project from the drop down menu and provide as much information as possible regarding your server environment and browser. Thanks!

FS#260 — German Umlaute are stripped off alias names

Attached to Project — MODx
Opened by Timon Reinhard (netnoise) - Tuesday, 14 February 2006, 11:54AM
Last edited by Ryan Thrash (rthrash) - Sunday, 13 August 2006, 04:59PM
Task Type Bug Report
Category Core Distribution
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version 0.9.1
Due in Version 0.9.5
Due Date Undecided
Percent Complete 100%

Details

Instead of removing, they should be transcoded: Ä => Ae, Ö => Oe, Ü => ue, ä => ae, ö => oe, ü => ue, ß => ss

My suggestion to do that ;-)

function stripAlias($alias) {
global $modx;

if(strtoupper($modx->config['etomite_charset'])=='UTF-8') $alias = utf8_decode($alias);
$alias = strtr($alias, array(chr(196) => 'Ae', chr(214) => 'Oe', chr(220) => 'Ue', chr(228) => 'ae', chr(246) => 'oe', chr(252) => 'ue', chr(223) => 'ss'));

$alias = strip_tags($alias);
//$alias = strtolower($alias);
$alias = preg_replace('/&.+?;/', '', $alias); // kill entities
$alias = preg_replace('/[^\\.%A-Za-z0-9 _-]/', '', $alias);
$alias = preg_replace('/\\s+/', '_', $alias);
$alias = preg_replace('|-+|', '-', $alias);
$alias = trim($alias, '-');
return $alias;
}

This task depends upon

This task blocks these from closing
Closed by  Timon Reinhard (netnoise)
Sunday, 08 October 2006, 03:59PM
Reason for closing:  Fixed
Additional comments about closing:  A long time ago ;-)
Comment by Ryan Thrash (rthrash) - Tuesday, 28 March 2006, 01:04AM
Timon, did you commit this into your branch?

Comment by Timon Reinhard (netnoise) - Wednesday, 29 March 2006, 04:36AM
As far as I can see, this is already in trunc.