summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-04-07 09:48:41 +0200
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-14 13:27:04 +0200
commit71075740aee2e15f574d19d452f0a586e25a6bd0 (patch)
treeb93c1fcfc73ef99400818a20e4b045069c50ebea /sd/source
parent427769a751d3f45e41e5a0f4aed385bb2727998c (diff)
Make encodeForXml accessible for other modules
and share similar code Change-Id: I7729a46d40845893f577c273c1ab340f69ebb51b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151230 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151754 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/html/htmlex.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 7c526539d9ee..c3f1625dad59 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -27,6 +27,7 @@
#include <rtl/tencinfo.h>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertyvalue.hxx>
+#include <comphelper/xmlencode.hxx>
#include <o3tl/safeint.hxx>
#include <osl/file.hxx>
#include <unotools/pathoptions.hxx>
@@ -289,10 +290,10 @@ OUString HtmlState::SetLink( const OUString& aLink, const OUString& aTarget )
if (!aLink.isEmpty())
{
- aStr += "<a href=\"" + aLink;
+ aStr += "<a href=\"" + comphelper::string::encodeForXml(aLink);
if (!aTarget.isEmpty())
{
- aStr += "\" target=\"" + aTarget;
+ aStr += "\" target=\"" + comphelper::string::encodeForXml(aTarget);
}
aStr += "\">";
mbLink = true;