Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#6862 closed defect (bug) (fixed)

Image Alignment Changes when Author Saves

Reported by: scvbruce's profile scvbruce Owned by: azaozz's profile azaozz
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.5
Component: TinyMCE Keywords: image alignment roles
Focuses: Cc:

Description

My authors are not able to save the alignment they apply to images in posts with the Insert/edit emage icon.

When "admin" edits the picture with the Insert/edit emage icon on the visual editor, the code looks like this:

<strong>Does Microsoft really need Yahoo?<img class="alignright" style="float: right; margin: 4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>


When an "author" edits the picture with the Insert/edit emage icon on the visual editor, and then saves the picture, the code looks like this, and the alignment goes away:

<strong>Does Microsoft really need Yahoo?<img class="alignright" style="4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>

It's like an author doesn't have the permission to change that part of the code.

Attachments (1)

image alignment problem.txt (963 bytes) - added by scvbruce 16 years ago.
a better formatted file of the problem

Download all attachments as: .zip

Change History (7)

#1 @scvbruce
16 years ago

My authors are not able to save the alignment they apply to images in posts with the Insert/edit emage icon.

When "admin" edits the picture with the Insert/edit emage icon on the visual editor, the code looks like this:

<strong>Does Microsoft really need Yahoo?<img class="alignright" style="float: right; margin: 4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>


When an "author" edits the picture with the Insert/edit emage icon on the visual editor, and then saves the picture, the code looks like this, and the alignment goes away:

<strong>Does Microsoft really need Yahoo?<img class="alignright" style="4px;" src="http://technology.newsbyte.com/wp-content/uploads/2008/04/dignanperlow.jpg" alt="Dignan and Perlow" width="300" height="172" /></strong>

It's like an author doesn't have the permission to change that part of the code.

@scvbruce
16 years ago

a better formatted file of the problem

#2 @ryan
16 years ago

  • Owner changed from anonymous to azaozz

#3 @pcorn54
16 years ago

I am having the same type of problem and I believe it is in the manner the code is written.

"alignleft" or center or right does not seem to work. When I delete the "alignwhatever" and add at the end of the string manually align="left" right of whatever, everything aligns as it should. Very annoying.

#4 @Otto42
16 years ago

  • Milestone set to 2.6
  • Priority changed from high to normal
  • Severity changed from major to normal

The problem is kses related, I think. Authors don't have unfiltered_html, so they get kses applied and the float style gets removed. Admins do have unfiltered_html, and so they can do it.

#5 @Otto42
16 years ago

Also, the alignleft/right/center classes are new to 2.5, and you will need to adjust your theme to account for them.

Read this, bottom of the post:
http://wordpress.org/support/topic/164999

#6 @azaozz
16 years ago

  • Milestone changed from 2.9 to 2.7
  • Resolution set to fixed
  • Status changed from new to closed

Both float right/left and alignright/alignleft work when publishing as an author.

Note: See TracTickets for help on using tickets.