aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-18 00:38:12 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-30 19:11:03 +0100
commitb9af421ef788b94fcbf18ecf702cec3ba9a018b7 (patch)
tree302acb7115800a00e9194c1918d0cd7e8181ce7d
parentaa0a379b37889caad022ec12fba76990b2e2e2d9 (diff)
downloadqpdf-b9af421ef788b94fcbf18ecf702cec3ba9a018b7.tar.zst
Add missing \f support for JSON string encoder
-rw-r--r--libqpdf/JSON.cc3
-rw-r--r--qpdf/qtest/qpdf/json-outlines-with-actions.out4
-rw-r--r--qpdf/qtest/qpdf/json-outlines-with-old-root-dests.out4
3 files changed, 7 insertions, 4 deletions
diff --git a/libqpdf/JSON.cc b/libqpdf/JSON.cc
index c656bb14..a45dbd2e 100644
--- a/libqpdf/JSON.cc
+++ b/libqpdf/JSON.cc
@@ -181,6 +181,9 @@ JSON::encode_string(std::string const& str)
case '\b':
result += "\\b";
break;
+ case '\f':
+ result += "\\f";
+ break;
case '\n':
result += "\\n";
break;
diff --git a/qpdf/qtest/qpdf/json-outlines-with-actions.out b/qpdf/qtest/qpdf/json-outlines-with-actions.out
index 9755d0b8..bfc67cfd 100644
--- a/qpdf/qtest/qpdf/json-outlines-with-actions.out
+++ b/qpdf/qtest/qpdf/json-outlines-with-actions.out
@@ -1653,8 +1653,8 @@
"99 0 R": 46,
"trailer": {
"/ID": [
- "Õ+\u000c\u0017Â\u0016Pib®gC¯ì&\u000f",
- "Õ+\u000c\u0017Â\u0016Pib®gC¯ì&\u000f"
+ "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f",
+ "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f"
],
"/Root": "1 0 R",
"/Size": 109
diff --git a/qpdf/qtest/qpdf/json-outlines-with-old-root-dests.out b/qpdf/qtest/qpdf/json-outlines-with-old-root-dests.out
index af3ce99c..2d4a81d4 100644
--- a/qpdf/qtest/qpdf/json-outlines-with-old-root-dests.out
+++ b/qpdf/qtest/qpdf/json-outlines-with-old-root-dests.out
@@ -1651,8 +1651,8 @@
"99 0 R": 45,
"trailer": {
"/ID": [
- "Õ+\u000c\u0017Â\u0016Pib®gC¯ì&\u000f",
- "Õ+\u000c\u0017Â\u0016Pib®gC¯ì&\u000f"
+ "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f",
+ "Õ+\f\u0017Â\u0016Pib®gC¯ì&\u000f"
],
"/Root": "1 0 R",
"/Size": 108