https://bugs.documentfoundation.org/show_bug.cgi?id=89069

            Bug ID: 89069
           Summary: FORMATTING, FILESAVE: HTML output removes bold/italic
                    from open-quote characters
           Product: LibreOffice
           Version: 4.2.1.1 release
          Hardware: x86 (IA32)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

(First: I'm new to this community and to Bugzilla. I apologize if lumping the
two issues described below into one entry is incorrect. If it is and they need
to be split, please feel free to do so; if one needs to be ignored, ignore the
latter issue.)

I have two issues with Writer and HTML. I know these go back to at least
4.2.1.1, but I can't speak to earlier versions. I use LibreOffice Writer to
create/edit documents as ODT files, then "Save a Copy" with "HTML Document
(Writer)" to export an HTML copy, which is intended for use in an XHTML
environment. (The "Export as XHTML" code is far messier and harder to clean up,
but I should note that it does NOT exhibit these specific bugs. Hence, these
are most likely save-as-HTML filter issues rather than Writer bugs.)
Furthermore, I am using smart quotes and UTF-8 encoding.

1. When a paragraph begins with an open-single-quote or open-double-quote
character, and that character has certain direct formatting applied to it, the
character does not retain said formatting in the HTML file. For instance,
consider this line of dialogue:

“That seems strange.”

If the first five characters are italicized, the expected output would be:

<p class="western"><i>“That</i> seems strange.”</p>

...but the generated output is:

<p class="western">“<i>That</i> seems strange.”</p>

...with the open-double-quote rendered as plain text, not italicized.
Single-quote dialogue shows the same behavior, but this bug does NOT happen
with formatted closing quotes at the end of a paragraph, or with any sort of
quotes in mid-paragraph. Thus, italicizing the first two words of this line
would save correctly:

Oops. “That seems strange.”
<p class="western"><i>Oops. “That</i> seems strange.”</p>

In my testing, only the bold and italic formats are affected by this bug.
Applying bold, italic, underline, superscript, and strike to the selection (in
that order) results in the following:

<p class="western"><strike><sup><u>“<i><b>That</b></u></i></sup></strike>
seems strange.”</p>

2. Although it's more of a stylistic preference than a true bug, the saved HTML
contains hard line breaks (based on about a 70-72 character line, not counting
HTML tags) instead of reserving those for breaks between block-level elements.
An enhancement to the HTML save filter to allow user configuration of that
behavior (no breaks, hard line breaks, breaks between block-level) would be
rather helpful. Save a Copy > HTML breaks at every line, Export... > XHTML has
no breaks, and I'm advocating something in between.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to