Forums / Cotonti / Extensions / [RELEASE] AutoALIAS <- simple way to autocreate aliases

GHengeveld
#10747 2009-03-30 17:13
There are better ways to replace illegal URI characters from a string. Please have a look here and here. Of course this isn't the prettiest option, but at least it should work for all languages. The best thing to use would be the php command:
$output = preg_replace("/[^A-Za-z0-9]/", "", $input);
Even though it will remove illegal chars instead of replace them.

Also, you could have done with a lot less code if you had used jQuery... Something like:
$("input[name='newpagealias']").val('Default text');
This post was edited by Koradhil (2009-03-30 17:31, 15 years ago)