Img package is a very functional module for positioning images around your page layout the easy way.
Because xhtml validation is important to me, I found a validation error when using the advanced mode [img:xx]. When I use the image tag [img:1 align=float_left title=none] the markup will return the image code within a div style <div class="img_box img_left" style= .... When viewing the page, the content of my page will put paragraphs

around it and this is not valid xhtml. I found that starting and ending the div style of the image tag with an

this will validate everything as xhtml. Div styles are not permitted with paragraph tags, unless you mark these div's as an object. Around line 126 of the img.module file I changed the code from: return '
' . $content . '
'; to return '<object><div class="img_box ' . $additional_box_class . '" style="width:' . ($width + 10) . 'px">' . $content . '</div></object>'; So include the tag around the div styles and the validation is complete. I think this has to be added for every single image placement (like floated, aligned, etc) into the module, although I haven't tested this. Regards

Comments

Simx0r’s picture

The code to change around line 126 of the img.module file is:

return '<div class="img_box ' . $additional_box_class . '" style="width:' . ($width + 10) . 'px">' . $content . '</div>;

to

return '<object><div class="img_box ' . $additional_box_class . '" style="width:' . ($width + 10) . 'px">' . $content . '</div></object>';

he_who_shall_not_be_named’s picture

It is a known problem (http://drupal.org/node/239576) and your solution is very interesting. I'll test it.

Simx0r’s picture

Some code has been wiped out of my post, sorry for that. The code to replace is what it's all about. Begin and end the div part with <object></object> for the image placing line in the module file.

I'll be checking back soon!
Keep up the good work.

he_who_shall_not_be_named’s picture

Status: Active » Fixed

Fixed in 6.x-1.9. Thanks!

he_who_shall_not_be_named’s picture

Status: Fixed » Active

Cannot fix using this way. See - #243609: html error with internet explorer

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 150270)