[wp-trac] [WordPress Trac] #2990: Inline Upload Image Size Attribute Problem For "Using Original"

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 1 01:57:49 GMT 2006


#2990: Inline Upload Image Size Attribute Problem For "Using Original"
----------------------------+-----------------------------------------------
 Reporter:  intoxination    |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  normal          |   Milestone:           
Component:  Administration  |     Version:  2.0.4    
 Severity:  normal          |    Keywords:           
----------------------------+-----------------------------------------------
 In the inline-uploading.php, when you select to use the original and send
 it to the editor, the height attribute is still included in the img tag,
 making the image appear as a thumbnail.

 This problem seems to be isolated to IE only and the problem appears to
 come from the lack of quotes around the attribute value (in this case
 height). The simple workaround I have right now is to add the following
 line into the sendToEditor Javascript function (around line 431):

 After:
         h = o.innerHTML.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1');
 // Trim

 Add:
         h = h.replace(new RegExp(' (width|height)=.*?', 'g'), ''); // Drop
 size constraints

 This strips the height and width constraints without quotes.

 I have noticed this problem in versions 2.0 and up (including 2.04).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2990>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list