Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Drop trackbacks that request UTF-7
git-svn-id: http://svn.automattic.com/wordpress/trunk@7559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
ryan committed Mar 28, 2008
1 parent c4865c3 commit 121fca1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wp-trackback.php
Expand Up @@ -43,6 +43,10 @@ function trackback_response($error = 0, $error_message = '') {
else
$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';

// No valid uses for UTF-7
if ( false !== strpos($charset, 'UTF-7') )
die;

if ( function_exists('mb_convert_encoding') ) { // For international trackbacks
$title = mb_convert_encoding($title, get_option('blog_charset'), $charset);
$excerpt = mb_convert_encoding($excerpt, get_option('blog_charset'), $charset);
Expand Down

0 comments on commit 121fca1

Please sign in to comment.