Style attributes removed
ddyrr - July 4, 2008 - 01:35
| Project: | Zemanta |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | JureCuhalev |
| Status: | needs work |
Jump to:
Description
Style attributes are always removed from Filtered HTML in Drupal for security. Would it be possible to change the style attributes to class attributes? Without the proper styles, the images never appear in the proper positions.

#1
Make sense. We'll try to change it so it will work with filtered security also. For now we recommend Full HTML post, but we understand the need for more secure version.
#2
I figured out a quick fix for this problem for now, It works great for my purposes until the problem is fixed.
Create a zemanta.css file with the following code:
.zemanta-img {
margin: 1em;
float: right;
display: block;
}
.zemanta-img img {
border: medium none ;
display: block;
}
I do all the images on the right. If yours are different, you can put float: left instead.
The at the top of your template.php theme file, put the following line:
<?phpdrupal_add_css("path/to/zementa/zemanta.css");
?>
#3
#4
It looks like the latest drag/drop version of this works great. I still use the patch, however, for when a user adds an image with single-click.
#5
I don't know what I was thinking. It actually has the same problem before. It looks fine while editing, but the style elements are stripped after submission, so you still need the patch, even with draggable elements. The one way it works with draggable elements is when you put the images in a table.
#6
We're working on a set of sample styles that you can include in your Drupal. Classes are already added, but without the CSS, you're right, they don't help much.