From 1659176c0d49c51cb2e20e2a4c1e823ffb2c6446 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 21 Sep 2019 01:38:17 +0200 Subject: [PATCH 1/3] escape html before parsing commonmark --- src/Utils.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index 5c664b7c..8c02b1c2 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -324,10 +324,25 @@ utils::linkifyMessage(const QString &body) return doc; } +QByteArray escapeRawHtml(const QByteArray &data) { + QByteArray buffer; + const size_t length = data.size(); + buffer.reserve(length); + for(size_t pos = 0; pos != length; ++pos) { + switch(data.at(pos)) { + case '&': buffer.append("&"); break; + case '<': buffer.append("<"); break; + case '>': buffer.append(">"); break; + default: buffer.append(data.at(pos)); break; + } + } + return buffer; +} + QString utils::markdownToHtml(const QString &text) { - const auto str = text.toUtf8(); + const auto str = escapeRawHtml(text.toUtf8()); const char *tmp_buf = cmark_markdown_to_html(str.constData(), str.size(), CMARK_OPT_DEFAULT); From 288bc7fc3dcf73f2dab880c5e096d1ea30b291f0 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 3 Oct 2019 23:03:03 +0200 Subject: [PATCH 2/3] Try to use an older linuxdeployqt appimage I think the most recent build broke deployments? --- .ci/linux/deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/linux/deploy.sh b/.ci/linux/deploy.sh index 61b2e408..2caf5e0f 100755 --- a/.ci/linux/deploy.sh +++ b/.ci/linux/deploy.sh @@ -25,8 +25,8 @@ for iconSize in 16 32 48 64 128 256 512; do done # Only download the file when not already present -if ! [ -f linuxdeployqt-continuous-x86_64.AppImage ] ; then - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" +if ! [ -f linuxdeployqt-6-x86_64.AppImage ] ; then + wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage" fi chmod a+x linuxdeployqt*.AppImage From cade911a031e48750b7e64ec3b9cb4001c1de820 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sun, 6 Oct 2019 12:36:13 +0200 Subject: [PATCH 3/3] Try to fix slow macos build Try to prevent node upgrade via homebrew --- .ci/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.ci/install.sh b/.ci/install.sh index d8dd67f2..c1f42357 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -4,6 +4,10 @@ set -ex if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update + + # uninstall packages, that would get upgraded by upgrading cmake (and we don't need) + brew uninstall --force cgal node sfcgal postgis + brew install qt5 lmdb clang-format ninja libsodium cmark brew upgrade boost cmake icu4c || true