Index: FCKeditor/trunk/_whatsnew.html
===================================================================
--- FCKeditor/trunk/_whatsnew.html	(revision 2019)
+++ FCKeditor/trunk/_whatsnew.html	(revision 2022)
@@ -49,4 +49,7 @@
 
 		
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2163">#2163</a>] If the FCKConfig.DocType
+			setting points to a HTML DocType then the output won't generate self-closing tags (it will output 
+			&lt;img &gt; instead of &lt;img /&gt;).</li>
 	</ul>
 	<p>
Index: FCKeditor/trunk/editor/_source/internals/fckregexlib.js
===================================================================
--- FCKeditor/trunk/editor/_source/internals/fckregexlib.js	(revision 2019)
+++ FCKeditor/trunk/editor/_source/internals/fckregexlib.js	(revision 2022)
@@ -79,4 +79,5 @@
 Html4DocType	: /HTML 4\.0 Transitional/i ,
 DocTypeTag		: /<!DOCTYPE[^>]*>/i ,
+HtmlDocType		: /DTD HTML/ ,
 
 // These regex are used to save the original event attributes in the HTML.
Index: FCKeditor/trunk/editor/_source/internals/fckxhtml.js
===================================================================
--- FCKeditor/trunk/editor/_source/internals/fckxhtml.js	(revision 2019)
+++ FCKeditor/trunk/editor/_source/internals/fckxhtml.js	(revision 2022)
@@ -71,6 +71,11 @@
 	sXHTML = sXHTML.substr( 7, sXHTML.length - 15 ).Trim() ;
 
-	// Add a space in the tags with no closing tags, like <br/> -> <br />
-	sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />');
+	// According to the doctype set the proper end for self-closing tags
+	// HTML: <br>
+	// XHTML: Add a space, like <br/> -> <br />
+	if (FCKConfig.DocType.length > 0 && FCKRegexLib.HtmlDocType.test( FCKConfig.DocType ) )
+		sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, '>');
+	else
+		sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />');
 
 	if ( FCKConfig.ForceSimpleAmpersand )
