From a50ad8f9267585f87a1d5c3053c31c027088fe91 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 27 Jan 2017 09:15:47 +0100 Subject: [PATCH] Handle backslash in escape function. Fixes: #4595. Candidate for stable --- src/support/lstrings.cpp | 3 ++- status.22x | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index f4aba23c0a..012dc21635 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -1179,7 +1179,8 @@ docstring const escape(docstring const & lab) for (size_t i = 0; i < lab.length(); ++i) { char_type c = lab[i]; if (c >= 128 || c == '=' || c == '%' || c == '#' || c == '$' - || c == '}' || c == '{' || c == ']' || c == '[' || c == '&') { + || c == '}' || c == '{' || c == ']' || c == '[' || c == '&' + || c == '\\') { // Although char_type is a 32 bit type we know that // UCS4 occupies only 21 bits, so we don't need to // encode bigger values. Test for 2^24 because we diff --git a/status.22x b/status.22x index 65872abe21..7fd3b2a099 100644 --- a/status.22x +++ b/status.22x @@ -125,6 +125,8 @@ What's new - Protect citation arguments (pre and post text) which contain brackets (part of bug 2751). +- Handle backslash in label and ref insets (bug 4595). + * LYX2LYX -- 2.39.5