Commit 3f2ebf334b2d42b84243da589fe41df0e28cc2e8
1 parent
230f1ab2
Fix bug in QPDF_Name::normalizeName introduced in #891
'#' was omitted from the list of chars that need to be escaped.
Showing
3 changed files
with
5 additions
and
3 deletions
libqpdf/QPDF_Name.cc
| ... | ... | @@ -38,9 +38,9 @@ QPDF_Name::normalizeName(std::string const& name) |
| 38 | 38 | // invalid #. |
| 39 | 39 | result += "#"; |
| 40 | 40 | } else if ( |
| 41 | - ch < 33 || ch == '/' || ch == '(' || ch == ')' || ch == '{' || | |
| 42 | - ch == '}' || ch == '<' || ch == '>' || ch == '[' || ch == ']' || | |
| 43 | - ch == '%' || ch > 126) { | |
| 41 | + ch < 33 || ch == '#' || ch == '/' || ch == '(' || ch == ')' || | |
| 42 | + ch == '{' || ch == '}' || ch == '<' || ch == '>' || ch == '[' || | |
| 43 | + ch == ']' || ch == '%' || ch > 126) { | |
| 44 | 44 | result += QUtil::hex_encode_char(ch); |
| 45 | 45 | } else { |
| 46 | 46 | result += ch; | ... | ... |
qpdf/qtest/qpdf/pound-in-name.pdf