Welcome Guest, Not a member yet? Register   Sign In
url_title and apostrophe
#1

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.

PHP Code:
// url_helper.php - line 493
$trans = array(
 
'&.+?;' => '',
'[^\w\d _-]' => '',
'\s+' => $separator,
'('.$q_separator.')+' => $separator
); 
Reply


Messages In This Thread
url_title and apostrophe - by imabot - 11-01-2018, 11:37 PM
RE: url_title and apostrophe - by jreklund - 11-02-2018, 12:10 AM
RE: url_title and apostrophe - by imabot - 11-02-2018, 12:40 AM
RE: url_title and apostrophe - by jreklund - 11-02-2018, 05:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB