Table markup is mangled after save

edited September 2012 in Bug Reports
Hi,

I've recently switched to using the v1.0 branch and FUEL and now, when I save product data to the database through my PRODUCTS simple module, the markup for tables is truncated and mangled.

For example, this:
<TABLE style="WIDTH: 441px; HEIGHT: 581px" border=1 cellSpacing=1 cellPadding=1>

Becomes this:
<TABLE 441px; HEIGHT: 581px" border=1 cellSpacing=1 cellPadding=1>

NOTE: I know it is bad practice to style elements inline like this, but I "inherited" this website and the previous administrators were using an old CMS and all the tables were pasted from MS Word. Consequently, all of the table markup is full of presentational elements and I have to work with them as is for now.

Can anyone tell me why the "style="WIDTH:" part is being removed on save in the previous code examples?

Even though the new mangled markup will still be displayed in an okay fashion in a browser, it is no longer semantic and is virtually impossible to edit easily as the code is now a mess and no longer valid.

I don't think it is an editor issue since I've tried both Ckeditor and Markitup and get the same result. Also, this type of data was always saved "as is" in version 9.3.

Any ideas? Thanks!

Comments

  • edited 11:02AM
    I believe the problem has to do with the xss_clean function being ran on the content before savign. Try adding this to your MY_fuel_module.php configuration which will remove the xss_clean filter:
    'sanitize_input' => array('template','php'),
Sign In or Register to comment.