Bug #47097
closedImg tag not closed at all
0%
Description
Hello, I have found a bug in Typo3.
I have made an extension that get's contents of some user-defined parts using this:$partContent = $this->cObj->cObjGetSingle($partType, $conf['parts.'][$partName.'.'], $partName);
Now, when I have made a content element of type "Text and Images" and insert an image,
this image will not get a closing tag. For example I made an example element with one line of text and 1 image.
The output is as follows:
@<div id="c8" class="csc-default">
<div class="csc-textpic csc-textpic-left csc-textpic-above">
<div class="csc-textpic-imagewrap">
<figure class="csc-textpic-image csc-textpic-last">
<img src="uploads/pics/logo_small.png" width="75" height="14" alt=""*>*
</figure>
</div>
<div class="csc-textpic-text">
<p class="bodytext">Left Content w/ Image</p>
</div>
</div>
</div>@
Note that the img tag does not have a closing tag. This is unprocessed content, directly received from the call to cObjGetSingle.
Yes, in HTML5 this may be allowed (I think) but I also tried switching back to HTML4 (by setting doctype in typo3 to a HTML4 one) and the same issue occurs there, img tag not closed.
You may think, big deal, but because I use DOM to parse my html it simply won't show the element since it's not correctly formatted (missing end-tag).
Could you please fix this bug? I have only tested Typo3 4.7, with only content element type "Text and Images". It could occur with other element types as well.
Greetings!