]> git.lyx.org Git - features.git/commitdiff
Add some more characters that need to be escaped in labels etc.
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 29 Jun 2012 23:24:40 +0000 (01:24 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 29 Jun 2012 23:24:40 +0000 (01:24 +0200)
src/support/lstrings.cpp

index 7fe06a8d44764ff69f6335650d55b48c53b31142..612d670d929f65267b5ad560475398e5026dde6f 100644 (file)
@@ -1084,7 +1084,8 @@ docstring const escape(docstring const & lab)
        docstring enc;
        for (size_t i = 0; i < lab.length(); ++i) {
                char_type c = lab[i];
-               if (c >= 128 || c == '=' || c == '%') {
+               if (c >= 128 || 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