GetSimple Support Forum
News Manager - encoding tags - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: News Manager - encoding tags (/showthread.php?tid=1914)



News Manager - encoding tags - grs84pl - 2011-07-03

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.


News Manager - encoding tags - yojoe - 2011-07-04

If this questionable tag has been shown as: jelenia góra, then using htmlentities function is the proper way Wink