desktop/source/lib/init.cxx | 4 +++- tools/source/misc/json_writer.cxx | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
New commits: commit 16b0da38515467bf1819ccd88027934481cc5727 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Thu May 25 09:38:12 2023 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Jul 4 20:46:50 2023 +0200 jsdialog: encode properly control characters according to https://www.rfc-editor.org/rfc/rfc7159#section-7 strings in JSON should contain control characters (0x00-0x1f) encoded as \uXXXX Signed-off-by: Szymon Kłos <szymon.k...@collabora.com> Change-Id: I1f828f64e57328b5fa2dcf5853afe0d6ea643081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152262 Reviewed-by: Attila Szűcs <attila.sz...@collabora.com> Tested-by: Attila Szűcs <attila.sz...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153946 Tested-by: Jenkins diff --git a/tools/source/misc/json_writer.cxx b/tools/source/misc/json_writer.cxx index 3111cac2f816..8303e4c2973e 100644 --- a/tools/source/misc/json_writer.cxx +++ b/tools/source/misc/json_writer.cxx @@ -135,6 +135,15 @@ static char getEscapementChar(char ch) static bool writeEscapedSequence(sal_uInt32 ch, char*& pos) { + // control characters + if (ch <= 0x1f) + { + int written = snprintf(pos, 7, "\\u%.4x", static_cast<unsigned int>(ch)); + if (written > 0) + pos += written; + return true; + } + switch (ch) { case '\b': commit 8fc7ac5569592d5cd026d292202e8c51d670c241 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed May 17 16:09:06 2023 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Jul 4 20:46:42 2023 +0200 lok: linking-api: export correct target string export target string instead of boolean so user can jump into the target using that. this is fix for: https://github.com/CollaboraOnline/online/issues/6230 Signed-off-by: Szymon Kłos <szymon.k...@collabora.com> Change-Id: Id4b1a1c65ddcb6f4d94d3939dda9124f2d10e9d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151884 Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153944 diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index bef06bcd4f98..dbd236858ce8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -480,7 +480,9 @@ static bool extractLinks(const uno::Reference< container::XNameAccess >& xLinks, if (bIsTarget) { - jsonText.append("true"); + jsonText.append("\""); + jsonText.append(aLink); + jsonText.append("\""); continue; } jsonText.append("{");