Welcome Guest, Not a member yet? Register   Sign In
characters čćšđž in url_title()
#1

[eluser]Svemoguci[/eluser]
sorry for my bad english, i hope that you will understand my question

I would like to use this characters čćšđž in url but when i pass string with this chars they disappear. I've try to change url_helper and i add those in array

Code:
$trans = array(
                        "č"                        => 'c',
                        "ć"                        => 'c',
                        "š"                        => 's',
                        "đ"                        => 'dj',
                        "ž"                        => 'z',
                        '&\#\d+?;'                => '',
                        '&\S+?;'                => '',
                        '\s+'                    => $replace,
                        '[^a-z0-9\-\._]'        => '',
                        $replace.'+'            => $replace,
                        $replace.'$'            => $replace,
                        '^'.$replace            => $replace,
                        '\.+$'                    => ''
                    );

and this is ok, but i would like to display original characters, not replacements.

I would be grateful if someone help me Smile
#2

[eluser]toopay[/eluser]
Include those character into permitted uri char section at your 'config.php' under 'application/config' folder.
#3

[eluser]Svemoguci[/eluser]
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-šđčćž';

does not working Sad
#4

[eluser]developer10[/eluser]
[quote author="Svemoguci" date="1304649438"]
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-šđčćž';

does not working Sad[/quote]

Hi Svemoguci,

I had the same problem long time ago, and searched very thoroughly for the solution but had no success. I was even advised from a fellow CI contributor that having those characters isnt recommended (even when you permit them). The reason - dont really remember but what i did was to create a function that will replace those characters with the english ones.

====
Usput da te pitam odakle si?
Drago mi je da ima još nekoga iz bivše Juge ovdje Smile
#5

[eluser]Svemoguci[/eluser]
Ja iz Srbije, Nis Smile sa eng slovima mi radi lepo kad modifikujem url_helper, ali sa kvacicama zeza. Hvala u svakom slucaju na odgovoru Smile




Theme © iAndrew 2016 - Forum software by © MyBB