Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Other BFA WordPress Themes (http://forum.bytesforall.com/forumdisplay.php?f=3)
-   -   Page title meta tag encoding issue (http://forum.bytesforall.com/showthread.php?t=2666)

pretenuomului Jul 27, 2009 12:46 AM

Page title meta tag encoding issue
 
This MAY be considered a bug, but it's actually a simple encoding issue I've discovered and thought I'd share.

Config:

Wordpress 2.8.2
Atahualpa 3.4.1 with

"Use bytes for all SEO options?"-enabled
"Meta Title Tag format" = `Page Title`

Symptoms:

If any of the strings that would become part of page title meta tag (post name, category name, search name etc.) contains non-ASCII chars, the output is messed up like so:
Code:

'ţeavă' becomes 'Å£eavÄ�'
This DOES NOT occur when switching back to the default theme.

Solution:

In bfa_meta_tags.php, the htmlentities() call on lines 75 and 83 needs a the third parameter specified as 'UTF-8':
Code:

$bfa_ata_page_title = htmlentities(single_cat_title('', false),ENT_QUOTES, 'UTF-8');
$bfa_ata_page_title = htmlentities(wp_specialchars($s),ENT_QUOTES, 'UTF-8');

This will solve the issue.

Hope this helps those using the theme in languages using funny chars. Perhaps it would be a good idea to fix this directly in the official release.


All times are GMT -6. The time now is 07:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.