[wp-trac] [WordPress Trac] #6681: Style lost in feed

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 11 15:08:48 GMT 2008


#6681: Style lost in feed
-----------------------------+----------------------------------------------
 Reporter:  andrewjorgensen  |       Owner:  anonymous
     Type:  defect           |      Status:  new      
 Priority:  normal           |   Milestone:  2.7      
Component:  TinyMCE          |     Version:  2.5      
 Severity:  major            |    Keywords:           
-----------------------------+----------------------------------------------
 Beginning with 2.5 if I insert an image and change it's alignment to
 "right" using TinyMCE it adds a "float: right;" setting to a style
 attribute and "alignright" to the class attribute.  This has the effect of
 changing the alignment of the image in wordpress but the rss feed
 generator strips out the class and style attributes so that the image is
 default justified instead.

 Wherever possible standard html should be used within the post content so
 that formatting remains when the feed is viewed in a feed reader or
 aggregator.  A feed reader will not have access to the style information.
 Even if the style and class attributes were not stripped the reader
 wouldn't have the stylesheet and the reader software may not know how to
 interpret the style attribute.

 This can be worked around by manually adding the align="right" attribute
 to the img element.

 If formatting specific to the align="right" case is desired by the theme
 author she should use, for example, img[align="right"] as the selector in
 the stylesheet rather than an alignright class.  Using a selector in this
 way as opposed to a class will also cause the stylesheet propertied to be
 applied to posts written before the alignright class was used. See
 http://www.w3.org/TR/CSS21/selector.html

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


More information about the wp-trac mailing list