Closed GoogleCodeExporter closed 8 years ago
This issue was closed by revision r616.
Original comment by MichaelS...@gmail.com
on 1 Jan 2012 at 8:34
After this change (which has caused issue 283), lines 277 to 294 in
get_header() are "doing nothing": variables $description and $keywords are
given values, but not used later.
The excerpt that was inserted into the meta description (when the page's
description field is empty) is no longer generated.
Original comment by carnav
on 28 Jan 2012 at 9:55
This issue is still happening with get_header(), and now also with
get_page_meta_desc() and get_page_meta_keywords(), since r645.
á ä
are encoded as:
á ä
instead of:
á ä
(in meta desc and keywords)
I suggest you make some change in function encode_quotes(), which is -only-
called those 3 functions above.
admin/inc/basic.php, line 471,
Replace:
$text = htmlspecialchars($text, ENT_QUOTES);
by:
$text = str_replace('"', '"', str_replace("'", ''', $text) );
This way, encode_quotes will only *encode quotes* :-), both single and double
ones, which are the ones we want to avoid, as we're enclosing the text between
quotes (mostly double quotes, but just in case the template creator is using
single ones, better encode those too)
Original comment by carnav
on 29 Jan 2012 at 10:14
I update my suggestion. Instead of those str_replace, continue using
htmlspecialchars, but with a couple extra parameters. The patch to
encode_quotes would be:
admin/inc/basic.php, line 471,
Replace:
$text = htmlspecialchars($text, ENT_QUOTES);
by:
$text = htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false);
It does the same, encodes both ' and " but not &
Original comment by carnav
on 2 Feb 2012 at 4:55
Original issue reported on code.google.com by
MichaelS...@gmail.com
on 1 Jan 2012 at 7:43