Community

End tag for img getting removed automatically

I am using latest version of drupal 6. Everything is working fine except the page is not validating xhtml.

I have images on the node. Image has closing tag in the content box<img src="" /> but when I save the node the img close tag / gets removed automatically. And, then when I check for xhtml validation at w3.org it does not validate.

I have checked every possible thing on my drupal website from wysiwyg, input filters, content-type settings, etc. Also, I googled for hours and hours and still couldn't find solution to this problem. I don't know why is this happening even after typing the close tag for img it gets deleted after saving.

If someone have some clue on how to solve it then please let me know.

Comments

By default, Drupal checks the

By default, Drupal checks the input content and correct single use tags(img, meta, etc). In other words, if you input '<img src="..">' and left the tag unclosed, Drupal corrects it and insert the closing tag '<img src=".." />'. Check this function for more details http://api.drupal.org/api/drupal/modules%21filter%21filter.module/functi...

What you described is an abnormal behaviour. So, I propose to you to disable all custom WYSWIG editors and try to save the node using default "Full HTML" input format.

Thanks Alex, for the reply. I

Thanks Alex, for the reply.

I did what you said. I disabled the WYSIWYG module. The only library I was using was TinyMCE, which was auto-disabled as WYSIWYG was disabled. Then I went to re-save the node but it still shows the same problem. Do I need to uninstall WYSIWYG module from admin/build/modules/uninstall page?

Or, do you have any other idea(s)?