summaryrefslogtreecommitdiff
path: root/sw/source/filter/html/wrthtml.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/html/wrthtml.cxx')
-rw-r--r--sw/source/filter/html/wrthtml.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index ad50a1440578..c341eab2d1bc 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1198,8 +1198,9 @@ OUString SwHTMLWriter::convertHyperlinkHRefValue(const OUString& rURL)
}
}
}
- else
+ else if (!sURL.isEmpty() && sURL[0] != '#')
{
+ // Link is not started from "#", so looks like external link. Encode this URL.
INetURLObject aURL(sURL);
sURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
}