Rainie3535 / sigil

Automatically exported from code.google.com/p/sigil
GNU General Public License v3.0
0 stars 0 forks source link

HTML import process breaks when same elements are nested with blank class name #1289

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
*What steps will reproduce the problem?

1. Open the attached file (sigil_bug.html) in Sigil.
2. Press F11 key and see imported source code.

*What is the expected output?

Elements under <body> are correctly imported like below. 

    <body>
        <div class="">
            <div class="non-empty-class">
                This element won't be imported
            </div>
        </div>

        <p>This element won't be imported too</p>
    </body>

*What do you see instead?

There is no elements under <body> element like below.

    <body>
    </body>

*What version of the product are you using?

Sigil 0.5.2

*On what operating system?

Ubuntu 10.04 32bit

*Please provide any additional information below. If your source file
(SGF/EPUB/HTML/etc) is required to fully understand the problem, please
attach it to this issue. Read the ReportingIssues wiki page before
submitting!

It seems that this problem occurs when a element X is nested twice (in the 
above example, X is <div>) and the empty string is given as the class name for 
upper X and non-empty string is given as the class name for lower X.

Original issue reported on code.google.com by stillped...@gmail.com on 25 Feb 2012 at 2:55

Attachments:

GoogleCodeExporter commented 9 years ago
A similar thing happens when you do something like this:
<p>Some text <p>nested text</p></p>

If you save epub with code like the one above, Sigil modifies the html with 
this:
<p>Some text </p>
<p>nested text</p>

*What version of the product are you using?
0.5, 0.5.3

*On what operating system?
Vista 64bit

Original comment by filipiak...@gmail.com on 2 Mar 2012 at 10:15

GoogleCodeExporter commented 9 years ago
This is Tidy at work. The next version, whenever its available, will allow tidy 
to be turned off to allow you to keep these structures.

Original comment by daveheil...@gmail.com on 24 Aug 2012 at 2:57