Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
entities once more
#1
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
Reply
#2
which locale / codepage did you define in gsconfig.php`?
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#3
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
Reply
#4
So I guess it is solved now?

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

Cheers, Connie
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#5
Connie Wrote:So I guess it is solved now?
We wrote at same time.
this didn't work.
Reply
#6
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.
--
Nick.
Reply
#7
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.
Reply
#8
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?
--
Nick.
Reply
#9
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?
Reply
#10
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.
--
Nick.
Reply
#11
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
Reply
#12
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!
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#13
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>?
Reply
#14
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.
Reply
#15
https://github.com/GetSimpleCMS/GetSimpleCMS/issues/618
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)