You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2023/01/03 07:15:09 UTC

[Issue 80657] Importing apostrophes from HTML fails

https://bz.apache.org/ooo/show_bug.cgi?id=80657

damjan@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |damjan@apache.org
          Developer|---                         |Simple
         Difficulty|                            |
             Latest|4.1.0-dev                   |4.2.0-dev
    Confirmation in|                            |

--- Comment #9 from damjan@apache.org ---
Still an issue in the latest Git.

We just need 2 lines of code added to fix this bug. The patch below allows
reading "'" from HTML, but doesn't write it to HTML.

But should we unconditionally support the "'" entity, or only when the
HTML version is >= 5? If web browsers were supporting it in 2007, while the
first draft of HTML 5 was in 2008 and HTML 5 only became a stable
recommendation on October 2014, then we may have to support it in any HTML
version for better compatibility.


diff --git a/main/svtools/inc/svtools/htmlkywd.hxx
b/main/svtools/inc/svtools/htmlkywd.hxx
index ff11057f1a..5ec2e37c79 100644
--- a/main/svtools/inc/svtools/htmlkywd.hxx
+++ b/main/svtools/inc/svtools/htmlkywd.hxx
@@ -182,6 +182,7 @@
 #define OOO_STRING_SVTOOLS_HTML_C_lt "lt"
 #define OOO_STRING_SVTOOLS_HTML_C_gt "gt"
 #define OOO_STRING_SVTOOLS_HTML_C_amp "amp"
+#define OOO_STRING_SVTOOLS_HTML_C_apos "apos"
 #define OOO_STRING_SVTOOLS_HTML_C_quot "quot"
 #define OOO_STRING_SVTOOLS_HTML_C_Aacute "Aacute"
 #define OOO_STRING_SVTOOLS_HTML_C_Agrave "Agrave"
diff --git a/main/svtools/source/svhtml/htmlkywd.cxx
b/main/svtools/source/svhtml/htmlkywd.cxx
index 24b3160009..7554343ec6 100644
--- a/main/svtools/source/svhtml/htmlkywd.cxx
+++ b/main/svtools/source/svhtml/htmlkywd.cxx
@@ -278,6 +278,7 @@ static HTML_CharEntry __FAR_DATA aHTMLCharNameTab[] = {
        {{OOO_STRING_SVTOOLS_HTML_C_lt},                         60},
        {{OOO_STRING_SVTOOLS_HTML_C_gt},                         62},
        {{OOO_STRING_SVTOOLS_HTML_C_amp},                38},
+       {{OOO_STRING_SVTOOLS_HTML_C_apos},               39},
        {{OOO_STRING_SVTOOLS_HTML_C_quot},               34},

        {{OOO_STRING_SVTOOLS_HTML_C_Agrave},            192},

-- 
You are receiving this mail because:
You are on the CC list for the issue.
You are the assignee for the issue.