]> git.lyx.org Git - features.git/commitdiff
Handle backslash in escape function.
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 27 Jan 2017 08:15:47 +0000 (09:15 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 28 Jan 2017 08:27:45 +0000 (09:27 +0100)
Fixes: #4595.
Candidate for stable

src/support/lstrings.cpp
status.22x

index f4aba23c0a530d7c7e0aa4617b0950835776b875..012dc21635419230ee5b9d9b8f12233c41c88556 100644 (file)
@@ -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
index 65872abe215d4aabd4cc99f8380c652253dc2e4f..7fd3b2a099ef98d3b5e661278856e584798ee98e 100644 (file)
@@ -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