Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
News Manager - encoding tags
#1
Hi Again!
I schuld be a tester Smile

Ok. To the point
I'm using News Manager in polish languages,
when i write tag with polish special characters something goes wrong and I get message:

Code:
Notice: Undefined index: Jelenia-Góra in /home/dimgs/ftp/silesia_studio/fotoruszenie/plugins/news_manager/inc/site.php on line 52
Warning: Invalid argument supplied for foreach() in /home/dimgs/ftp/silesia_studio/fotoruszenie/plugins/news_manager/inc/site.php on line 60

This is happening because in:
/data/others/news_manager/post.xml

letter "ó" is reprezented by "ó"
I've reed that this is problem with PHP that he is changing special characters to entity, but Can anybody help me with this?


ps. I've added:
Code:
$tag=htmlentities($tag, ENT_QUOTES, "UTF-8");
to:
Code:
function nm_show_tag($tag) {
  $tags = nm_get_tags();
  $tag=htmlentities($tag, ENT_QUOTES, "UTF-8");
  $posts = $tags[$tag];
  foreach ($posts as $slug)
    nm_show_post($slug, true);
}

It's working, but I don't know is this is a proper solution.
Reply
#2
If this questionable tag has been shown as: jelenia góra, then using htmlentities function is the proper way Wink
Addons: blue business theme, Online Visitors, Notepad
Reply




Users browsing this thread: 1 Guest(s)