UtopiaSoftware Forums

Full Version: Trouble with š and ž
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Every time I insert š or ž to news I get "& # 3 5 3 ;" and "& # 3 8 2 ;". Actually there are no spaces between "" marks - I have to put them there because forum engine is changing them.
Is there any solution to that?
If you open news.inc.php and find:
$newstext = htmlspecialchars($newstext);

And replace with
//$newstext = htmlspecialchars($newstext);

This may fix it, but may also pose a problem if you have multiple users who you might not trust to not abuse HTML.
This is what I did in news.inc.php function unp_doNewsFormat($newstext)

PHP Code:
        if ($this->htmlallowance == '0')
        {
            
$newstext htmlspecialchars($newstext);
            
$find = array("Š""š""Ž""ž");
            
$replace = array("& # 3 5 2 ;"" & # 3 5 3 ;"" & # 3 8  1 ;"" & # 3  8 2 ;");
            
$newstext str_replace($find$replace$newstext);
        } 

A little primitive, but it works.

PS! Again there are no spaces between "& # 3 5 2 ;", "& # 3 5 3 ;" etc in my code.

Reference URL's