[wp-trac] [WordPress Trac] #12095: Images insert at full size if metadata contains odd characters

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 31 10:03:43 UTC 2010


#12095: Images insert at full size if metadata contains odd characters
--------------------------+-------------------------------------------------
 Reporter:  whlitwa       |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  high          |   Milestone:  Unassigned
Component:  Upload        |     Version:  2.9.1     
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------

Comment(by whlitwa):

 Update:

 I was able to fix the copyright symbol by updating function the_content()
 in
 /wp-includes/post-template.php

 For some reason, utf8 encoded copyright symbols like to translate to
 ©  (©)
 Knowing this, I was able to simply delete the utf8 Â.

 {{{
 #lines 164-169:
 function the_content($more_link_text = null, $stripteaser = 0) {
         $content = get_the_content($more_link_text, $stripteaser);
         $content = apply_filters('the_content', $content);
         $content = str_replace(']]>', ']]>', $content);
         $content = str_replace(mb_convert_encoding('Â', 'UTF-8',
 'HTML-ENTITIES'),'',$content); //added this line
         echo $content;
 }
 }}}



 Obviously not the best place to fix this bug, but might some kind of
 backwards utf8 decoding need to take place after the image is uploaded?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12095#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list