Hi,
i need to remove any dots from the url_title.
I try to modify config.php in this way:
$config[‘permitted_uri_chars’] = ‘a-z 0-9’;
but dots are still included in url_title field.
How can it be resolved?
Filippo
EE 2.5.2
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
September 19, 2012 9:33am
Subscribe [2]#1 / Sep 19, 2012 9:33am
Hi,
i need to remove any dots from the url_title.
I try to modify config.php in this way:
$config[‘permitted_uri_chars’] = ‘a-z 0-9’;
but dots are still included in url_title field.
How can it be resolved?
Filippo
EE 2.5.2
#2 / Sep 21, 2012 11:07am
Hi, Filippo_Me,
That is a CodeIgniter setting, not one that applies to EE. There is not an out of the box way to remove periods from the URL titles.
Are you having a specific problem with those period that we might be able to assist with?
#3 / Oct 05, 2012 2:09pm
What I need is to prevent the use of the point in the url_title
This is a simply solution:
Edit:
themes/javascript/compressed/jquery/plugins/ee_url_title.js
To:
(function(e){EE.namespace("EE.publish");e.fn.ee_url_title=function(h,f){return this.each(function(){var b=EE.publish.default_entry_title?EE.publish.default_entry_title:"",c=EE.publish.word_separator?EE.publish.word_separator:"_",i=EE.publish.foreignChars?EE.publish.foreignChars:{},a=e(this).val()||”“,j=RegExp(c+”{2,}”,“g”),d=c!==“_”?/\_/g:/\-/g,g=”“,k=EE.publish.url_title_prefix?EE.publish.url_title_prefix:”“;typeof f!==“boolean”&&(f=!1);b!==”“&&e(this).attr(“id”)===“title”&&a.substr(0,b.length)===
b&&(a=a.substr(b.length));a=(k+a).toLowerCase().replace(d,c);for(b=0;b<a.length;b++)d=a.charCodeAt(b),d>=32&&d<128?g+=a.charAt(b):d in i&&(g+=i[d]);a=g.replace(”/<(.*?)>/g”,”“);a=a.replace(/\s+/g,c);a=a.replace(/\//g,c);a=a.replace(/[^a-z0-9\-\_]/g,”“);a=a.replace(/\+/g,c);a=a.replace(j,c);a=a.replace(/^[\-\_]|[\-\_]$/g,”“);a=a.replace(/\.+$/g,”“);f&&(a=a.replace(/\./g,”“));h&&e(h).val(a.substring(0,75))})}})(jQuery);
Filippo
#4 / Oct 08, 2012 12:32pm
Hey there Filippo_Me,
Just remember that hack when you go to update ExpressionEngine!
Is there anything else I can help with?
Cheers,