Bug 118805

Summary: Drag and drop of images into project file creates wrong markup
Product: [Unmaintained] quanta Reporter: Samir M. Nassar <bugzilla>
Component: generalAssignee: András Manţia <amantia>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: IRIX   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Samir M. Nassar 2005-12-21 16:48:49 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Gentoo Packages
Compiler:          GCC 3.4.4 
OS:                Irix

To replicate:

* Create Project
* Add images to project
* Create XHTML 1.0 Strict HTML file (quickstart or otherwise)
* Drag and drop one of the images from the project to editor pane

Markup created:
<img src="../../../images/S.png" width="32" height="32" border="0">

Markup should be:

<img src="../../../images/S.png" width="32" height="32" border="0" />
Comment 1 András Manţia 2005-12-22 22:44:40 UTC
SVN commit 490714 by amantia:

Insert valid img tag for XHTML documents.

BUG: 118805

 M  +1 -0      ChangeLog  
 M  +4 -1      src/quanta.cpp  


--- branches/KDE/3.5/kdewebdev/quanta/ChangeLog #490713:490714
@@ -6,6 +6,7 @@
         - don't show the file changed dialog after using save as and save again
         - crash fixes in VPL [#118686]
         - don't loose the comment closing character when formatting the XML code [#118453]
+        - insert valid img tag for XHTML documents [#118805]
 
 Version 3.5 (Release date: 29-11-2005; Started 04-03-2004):
  - bugfixes:
--- branches/KDE/3.5/kdewebdev/quanta/src/quanta.cpp #490713:490714
@@ -870,7 +870,10 @@
           imgTag += QuantaCommon::quoteAttributeValue(height);
           imgTag += QuantaCommon::attrCase(" border=");
           imgTag += QuantaCommon::quoteAttributeValue(QString("%1").arg(0));
-          imgTag += ">";
+          if (w->currentDTD(true)->singleTagStyle == "xml")
+            imgTag += " />";
+          else
+            imgTag += ">";
           w->insertTag(imgTag);
           isImage = true;
         }