Hello,

TinyMCE 3.3.9.3 (full package) seems to be trying to sanitize Only local images are allowed. tags and converts "align=center" attribute to "align=middle" on the fly. As button plugin gets the align parameter form the preview Only local images are allowed. when detaching the editor (node save, etc.), "|align=center" is converted to "|align=middle" mistakenly when reconstructing the filter. Therefore not only centering is broken but a defective filter is saved as well.

Then I hacked img_assist.js around line 86 from this

      var inlineTag = '[img_assist|' + decodeURIComponent(this.alt) + '|align=' + this.align + '|width=' + this.width + '|height=' + this.height + ']';

to this

      var setAlign = (this.align == 'middle') ? 'center': this.align;
      var inlineTag = '[img_assist|' + decodeURIComponent(this.alt) + '|align=' + setAlign + '|width=' + this.width + '|height=' + this.height + ']';

as a dirty fix.

I'm not sure if this problem is particular to our case and I'm really missing smt, but this seems to be a bug anyway.

Tx.

Comments

chawl’s picture

Oops, text is eaten above :/
I mean <img> tags as you might catch.

chawl’s picture

Title: TinyMCE sanitization causes centering problem » Centering is broken if node is edited with Firefox 4.0
Priority: Major » Minor

No, problem is not TinyMCE but Firefox 4.0, very very peculiar indeed.
Thus I'm changing few things...