11-01-2018, 11:37 PM
I noticed that the url_title fonction does not convert apostrophes (single quotes) to dash (or underscore).
French apostrophe is the same character as single quote.
For example : "L'apostrophe" should be slugifyed as "l-apostrophe"
Currently, single quotes are removed and not converted to separators (L'apostrophe → lapostrophe).
I would like to update the url_title function, but I'm not familiar with regex. Could someone help me to update the function so that it converts single quotes into dash.
French apostrophe is the same character as single quote.
For example : "L'apostrophe" should be slugifyed as "l-apostrophe"
Currently, single quotes are removed and not converted to separators (L'apostrophe → lapostrophe).
I would like to update the url_title function, but I'm not familiar with regex. Could someone help me to update the function so that it converts single quotes into dash.
PHP Code:
// url_helper.php - line 493
$trans = array(
'&.+?;' => '',
'[^\w\d _-]' => '',
'\s+' => $separator,
'('.$q_separator.')+' => $separator
);