aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2021-11-10 18:30:23 -0800
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-11-11 02:41:32 +0000
commit37f1cf1a925d67ce495ba44b77a08904ca1ee21b (patch)
tree9afcef4e1ce8030c3228107bc3bcaa34d972d357
parent9f46ae74ff9bc5983c0478986eae81b9917c1634 (diff)
Tools: Let jq escape backslashes in gen-bugnote.
-rwxr-xr-xtools/gen-bugnote7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/gen-bugnote b/tools/gen-bugnote
index cb005e52b2..c1d1f9a257 100755
--- a/tools/gen-bugnote
+++ b/tools/gen-bugnote
@@ -36,9 +36,14 @@ fi
issue_title=$(
curl -s -o - "${gitlab_issue_url_pfx}/$issue_id" \
- | jq --raw-output '.title'
+ | jq '.title'
)
+# We can escape backslashes in jq's --raw-output or we can trim quotes off
+# its plain output.
+issue_title="${issue_title%\"}"
+issue_title="${issue_title#\"}"
+
echo -e "* $issue_title wsbuglink:${issue_id}[].\\n" \
| $clipboard_cmd