GetSimple Support Forum

Full Version: entities once more
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
Can somebody tell me if GS3.1 will end problem with entities?
Im from Poland, and have problem with SEO, because every Ó is represented as ó
It's problem, when You live in Jelenia Góra Big Grin

This problem affects, keywords, description, content, title.

I've deal with it by making custom /admin/inc/theme_functions.php
I added
$myVar = html_entity_decode($myVar, ENT_QUOTES, "UTF-8");
almost everywhere, but this is undoing things that could be not done in first place.
Why change characters to entites when xml file is allready saved as UTF-8 ?

If this problem is allready fixed close this toppic, if not ? Im commiting official bug.

BR
Grzegorz
which locale / codepage did you define in gsconfig.php`?
Connie Wrote:which locale / codepage did you define in gsconfig.php`?
I can not be more stupid than I am.
I didn't define any.


now i've set
setlocale(LC_ALL, 'pl_PL');

and still have entites problem.. Only working solution is this, what I wrote earlier
So I guess it is solved now?

Please be aware, that this codepage-problems are not related to intelligence ;=)
they just happen!

Cheers, Connie
Connie Wrote:So I guess it is solved now?
We wrote at same time.
this didn't work.
To use utf-8 (and avoid html entities for normal text) throughout, it is necessary to set the editor options and change the safe_slash_html() function as mentioned in this post.
hameau Wrote:To use utf-8 (and avoid html entities for normal text) throughout, it is necessary to set the editor options and change the safe_slash_html() function as mentioned in this post.

I've done it... but this don't work with keywords and description. I think its a solution for page content only.


function get_page_meta_keywords($echo=true) {
global $metak;
$myVar = strip_decode($metak);
$myVar = html_entity_decode($myVar, ENT_QUOTES, "UTF-8");
if ($echo) {
echo $myVar;
} else {
return $myVar;
}
}


I've add bolded line in every get_page_XXX function in theme_functions.php that seems to work.
grs84pl Wrote:... but this don't work with keywords and description.
It works for me in page content, tags, description and menu text. Including Jelenia Góra. ;^ All code at the browser is utf-8 encoded, with no entities in the text.

Perhaps a plug-in is affecting your results? Or a cache somewhere?
grs84pl Wrote:Hi!
Can somebody tell me if GS3.1 will end problem with entities?
Im from Poland, and have problem with SEO, (...)
hameau Wrote:It works for me in page content, tags, description and menu text.
Do you have this problem already with 3.0? I have 3.0 and ó renders correctly in <title> only. In <meta> and in content it outputs as &oacute contrary to what hameau says. I also consider it as a bug - if <title> can be printed correctly, why not other fields from page options?
okay, I have checked with two servers. One of them shows no html entities, but the other one has the same symptoms that you describe, with all non-ascii characters (as well as html special characters) transformed.

I don't know the solution, but I guess it must be a server setting somewhere.
hameau Wrote:okay, I have checked with two servers. One of them shows no html entities, but the other one has the same symptoms that you describe, with all non-ascii characters (as well as html special characters) transformed.

I don't know the solution, but I guess it must be a server setting somewhere.

Solution is html_entity_decode, is it too much if I ask, that this will be implented in GS3.1 ?

BR
Grzegorz
grs84pl Wrote:Solution is html_entity_decode, is it too much if I ask, that this will be implented in GS3.1 ?

BR
Grzegorz

I doubt that this is the solution. It would also decode <, >, & in the text, which it must not do!
hameau Wrote:the same symptoms that you describe, with all non-ascii characters (as well as html special characters) transformed.
If the cause is server PHP setting and <title> is resistant to these settings, is it because <meta> and all the rest is proceeded with different PHP process than <title>?
mvlcek Wrote:I doubt that this is the solution. It would also decode <, >, & in the text, which it must not do!
I think it is... Got it on my sites, it decode only entities.
I made it like this (theme_functions.php line ~290) :
Code:
echo '<meta name="description" content="'.html_entity_decode(encode_quotes($description), ENT_QUOTES, "UTF-8").'" />'."\n";

Now I got no problem with entities.