<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>81162</bug_id>
          
          <creation_ts>2004-05-08 21:28:40 +0000</creation_ts>
          <short_desc>Quanta Deletes #include comments automatically without asking</short_desc>
          <delta_ts>2004-05-20 17:57:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>quanta</product>
          <component>general</component>
          <version>3.2.2</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Steve Clarke">trumpton6</reporter>
          <assigned_to name="András Manţia">amantia</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>229895</commentid>
    <comment_count>0</comment_count>
    <who name="Steve Clarke">trumpton6</who>
    <bug_when>2004-05-08 21:28:40 +0000</bug_when>
    <thetext>Version:           3.2.2 (using KDE 3.2.1, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
OS:          Linux (i686) release 2.6.3-4mdk

Manually adding &lt;!--#include virtual=&quot;./site/menu.html&quot;--&gt; in the &lt;body&gt; of the HTML where I want my Server Side Include Menu to end up.

When I flip to the WYSIWYG window, and change any of the text that is in the &lt;body&gt; of the document, the comment added above is cleared out to become &lt;----&gt;, which isn&apos;t too handy.

Attached below is the offending web page source, and please note that the two files called up, one in the CSS, and one in the #include do not yet exist (the site directory exists and is empty).

Steve Clarke

-- WEB SOURCE BELOW ---------------------------------

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.or
g/TR/html4/loose.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;title&gt;Header - Page Title&lt;/title&gt;
  &lt;meta name=&quot;GENERATOR&quot; content=&quot;Quanta Plus&quot;&gt;
  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;./site/site.css&quot;&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;table width=&quot;800&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td width=&quot;100&quot;&gt;&lt;!--#include virtual=&quot;./site/menu.html&quot;--&gt;&lt;/td&gt;
     &lt;td width=&quot;700&quot;&gt;
        &lt;h1&gt;
              Page Heading
            &lt;/h1&gt;
             Type Text in Here
            &lt;br&gt;
            &lt;br&gt;
      &lt;/td&gt;
   &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>229971</commentid>
    <comment_count>1</comment_count>
    <who name="András Manţia">amantia</who>
    <bug_when>2004-05-09 09:57:07 +0000</bug_when>
    <thetext>I thought that this is fixed in 3.2.2. But no, I can also reproduce. :-(

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>234680</commentid>
    <comment_count>2</comment_count>
    <who name="András Manţia">amantia</who>
    <bug_when>2004-05-20 17:57:40 +0000</bug_when>
    <thetext>CVS commit by amantia: 

(Once again) don&apos;t lose the comment text from inside a comment.
Backport will follow.

CCMAIL: 81162-done@bugs.kde.org


  M +2 -0      ChangeLog   1.279
  M +27 -0     parsers/saparser.cpp   1.43


--- kdewebdev/quanta/ChangeLog  #1.278:1.279
@@ -4,4 +4,6 @@
 Version 3.3 BE 3 (Release date: xx-xx-2004; Started 07-05-2004):
   - bugfixes:
+        - VPL:
+            - (once again) don&apos;t lose the comment text from inside a comment [#81162]
         - correctly load the plugins toolbar [#81031]
         - correctly size the DTD toolbar even when just one toolbar is loaded [#81063]

--- kdewebdev/quanta/parsers/saparser.cpp  #1.42:1.43
@@ -882,5 +882,32 @@ void SAParser::slotParseNodeInDetail()
     } else
     {
+      Node *node = m_currentNode;
       m_currentNode = m_currentNode-&gt;nextSibling();
+      if (node-&gt;tag-&gt;type == Tag::Comment)
+      {
+         Node *commentNode = new Node(node);
+         int line, col;
+         AreaStruct area;
+         node-&gt;tag-&gt;endPos(line, col);
+         area.bLine = line;
+         area.bCol = col + 1;
+         if (m_currentNode)
+           m_currentNode-&gt;tag-&gt;beginPos(line, col);
+        else
+         {
+            line = m_write-&gt;editIf-&gt;numLines() - 1;
+            col = m_write-&gt;editIf-&gt;lineLength(area.eLine);
+         }
+         area.eLine = line;
+         area.eCol = col - 1;
+         if (area.eCol &lt; 0)
+         {
+             area.eLine--;
+             area.eCol = m_write-&gt;editIf-&gt;lineLength(area.eLine);
+         }
+         Tag *tag = new Tag(area, m_write, node-&gt;tag-&gt;dtd(), false);
+         commentNode-&gt;tag = tag;
+         node-&gt;child = commentNode;
+      }
       if (m_currentNode)
       {


</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>