diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-06-24 16:07:15 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-06-27 08:57:31 +0200 |
commit | 167a5ce786b0561028ad42ea3fc92e55d14484a4 (patch) | |
tree | 1a9be8e273795a359a294ca19525d4e384a96348 /configure.ac | |
parent | 8e8e0aefc998adba749a93cacc4660d859fba675 (diff) |
sw HTML export: fix missing escaping for image links
Hyperlink URLs on images are currently written to the HTML output as-is,
without any any encoding.
Image links are written using HtmlWriter from svtools, which has the
advantage of not building the markup manually (similar to
sax_fastparser::FastSerializerHelper for XML), but that doesn't do any
escaping. Some other parts of the HTML export build the export markup
manually, but use HTMLOutFuncs::Out_String() to encode problematic
content.
Fix the problem by using HTMLOutFuncs::Out_String() in HtmlWriter for
attribute values: it seems reasonable to assume that users of HtmlWriter
would pass in unencoded strings, similar to how the sax serializer
works.
This could lead to double-encoding in case some user of
HtmlWriter::attribute() would encode its attribute value already, but
inspecting existing calls, none of the clients seem to do that at the
moment.
Change-Id: I5439e829b1b837cb9c51292b118f0b47e84197db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136399
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions