From 0ac919971be1c951589266b0e20d8307a698cd5c Mon Sep 17 00:00:00 2001 From: David Freese Date: Mon, 20 May 2013 18:31:36 -0500 Subject: [PATCH] eQSL url * Added suppression of CR/LF, control characters and characters > 0x7e from the eQSL url string. --- src/logbook/lookupcall.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/logbook/lookupcall.cxx b/src/logbook/lookupcall.cxx index 2f35dc0c..8eb51265 100644 --- a/src/logbook/lookupcall.cxx +++ b/src/logbook/lookupcall.cxx @@ -1285,10 +1285,11 @@ void makeEQSL(const char *message) tempstr.clear(); for (size_t n = 0; n < eQSL_url.length(); n++) { - if (eQSL_url[n] == ' ') tempstr.append("%20"); + if (eQSL_url[n] == ' ' || eQSL_url[n] == '\n') tempstr.append("%20"); else if (eQSL_url[n] == '<') tempstr.append("%3c"); else if (eQSL_url[n] == '>') tempstr.append("%3e"); - else tempstr += eQSL_url[n]; + else if (eQSL_url[n] > ' ' && eQSL_url[n] <= '}') + tempstr += eQSL_url[n]; } sendEQSL(tempstr.c_str());