Ticket #1349 (new Bug)

Opened 14 months ago

Last modified 9 months ago

Mozilla style="-moz-style: -moz-initial"

Reported by: Scott Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.4.3
Keywords: HasPatch Cc:

Description (last modified by fredck) (diff)

Sometimes mozilla can pollute html with -moz-xxx: moz-initial styles.

This breaks w3c style validation, and is unnecessary and annoying.

Can I suggest that when the editor switches to source, a regexp replace is ran that removes these styles.

Something like this would do the trick...

if(FCKBrowserInfo.IsGeckoLike)
{
	sHTML = sHTML.replace( /\s*-moz-[^:]+: -moz-initial\s*;/g, '' ) ;
}

Cheers

Scott

Attachments

regexp.txt (112 bytes) - added by Scott 14 months ago.
Regular expression (with no wiki formatting)

Change History

Changed 14 months ago by Scott

Apologies - wiki formatting messed up my regular expression...

sHTML = sHTML.replace(/\s*-moz-[ :]+: -moz-initial\s*;/g, );

Remove the spaces between "" and ":"

Changed 14 months ago by Scott

Roar - it did it again....

I have attached a file with the code in it.

Changed 14 months ago by Scott

Regular expression (with no wiki formatting)

Changed 14 months ago by fredck

  • keywords -moz-initial removed
  • component changed from UI : Source View to General
  • milestone FCKeditor 2.5 deleted

Changed 14 months ago by alfonsoml

  • version changed from SVN to FCKeditor 2.4.3

Changed 9 months ago by w.olchawa

  • keywords HasPatch added

Changed 9 months ago by fredck

  • description modified (diff)
Note: See TracTickets for help on using tickets.