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
Comment #1
Simx0r commentedThe 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>';Comment #2
he_who_shall_not_be_named commentedIt is a known problem (http://drupal.org/node/239576) and your solution is very interesting. I'll test it.
Comment #3
Simx0r commentedSome 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.
Comment #4
he_who_shall_not_be_named commentedFixed in 6.x-1.9. Thanks!
Comment #5
he_who_shall_not_be_named commentedCannot fix using this way. See - #243609: html error with internet explorer