Add some more characters that need to be escaped in labels etc.

This commit is contained in:
Juergen Spitzmueller 2012-06-30 01:24:40 +02:00
parent bbbc2b6541
commit 0062538a54

View 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