Project

General

Profile

Actions

Bug #47097

closed

Img tag not closed at all

Added by JMTiepo3 over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-04-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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>

&lt;div class=&quot;csc-textpic-text&quot;&gt;
&lt;p class=&quot;bodytext&quot;&gt;Left Content w/ Image&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;@

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!

Actions

Also available in: Atom PDF