From 0441427b484cc416bb70bba23d2f37dd69b603cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 22 Jul 2025 12:53:56 +0100 Subject: [PATCH] const up libxml2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iba1ae303bd4cb7ba81f871968286ae890363508b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188275 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- .../libxml2/0001-const-up-allowPCData.patch.1 | 26 +++++++++++++++++++ external/libxml2/UnpackedTarball_libxml2.mk | 4 +++ 2 files changed, 30 insertions(+) create mode 100644 external/libxml2/0001-const-up-allowPCData.patch.1 diff --git a/external/libxml2/0001-const-up-allowPCData.patch.1 b/external/libxml2/0001-const-up-allowPCData.patch.1 new file mode 100644 index 000000000000..1009b787f96f --- /dev/null +++ b/external/libxml2/0001-const-up-allowPCData.patch.1 @@ -0,0 +1,26 @@ +From 408bd0e18e6ddba5d18e51d52da0f7b3ca1b4421 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 24 Jul 2025 11:09:29 +0100 +Subject: [PATCH] const up allowPCData + +similar to htmlScriptAttributes +--- + HTMLparser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/HTMLparser.c b/HTMLparser.c +index 5386cfa7..afd085b5 100644 +--- a/HTMLparser.c ++++ b/HTMLparser.c +@@ -2143,7 +2143,7 @@ htmlEncodeEntities(unsigned char* out, int *outlen, + * into the html40ElementTable array but I don't want to risk any + * binary incompatibility + */ +-static const char *allowPCData[] = { ++static const char *const allowPCData[] = { + "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", + "blockquote", "body", "button", "caption", "center", "cite", "code", + "dd", "del", "dfn", "div", "dt", "em", "font", "form", "h1", "h2", +-- +2.49.0 + diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk index c92e46992db3..9884b020a20a 100644 --- a/external/libxml2/UnpackedTarball_libxml2.mk +++ b/external/libxml2/UnpackedTarball_libxml2.mk @@ -15,12 +15,16 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2)) $(eval $(call gb_UnpackedTarball_set_patchlevel,libxml2,2)) +# 0001-const-up-allowPCData.patch effort to upstream at: +# https://gitlab.gnome.org/GNOME/libxml2/-/merge_requests/333 + $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ $(if $(filter SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \ external/libxml2/libxml2-vc10.patch \ external/libxml2/libxml2-XMLCALL-redefine.patch.0 \ external/libxml2/makefile.msvc-entry-point.patch.0 \ external/libxml2/deprecated.patch.0 \ + external/libxml2/0001-const-up-allowPCData.patch.1 \ $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \ $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \ external/libxml2/libxml2-icu-sym.patch.0, \