summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-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;