In the control panel, I have used the setting here:
admin->channel admin->global preferences->Word Separator for URL Titles
to set the system to use the _ (underscore) when generating url_titles.
If I put this code anywhere in a template or module/extension, it uses - (hypen) to create the url_title, ignoring the preference set in the CP.
$this->EE->load->helper('url');
echo url_title("hello chicago!");This generates:
hello-chicagoI’m assuming that’s a bug?