diff --git a/AUTHORS b/AUTHORS index 50c51286..5d815505 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,3 +21,4 @@ suggestions: Bruno Vernay Ben Boeckel Wade Duvall + Sebastian Uharek diff --git a/ChangeLog b/ChangeLog index c9943f21..473d1bb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ (thanks to Ben Boeckel). - TD-115 Throw error when config file is missing or not readable (thanks to Jelle van der Waa). +- TI-2 Two line tags causes false entry in database + (thanks to Sebastian Uharek). - Added 'continue' command. - Added 'diagnostics' command. - Added 'export' command. diff --git a/src/CLI.cpp b/src/CLI.cpp index 90b9c03a..651bf89b 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -133,7 +133,13 @@ void CLI::entity (const std::string& category, const std::string& name) // Capture a single argument. void CLI::add (const std::string& argument) { - A2 arg (Lexer::trim (argument), Lexer::Type::word); + // Sanitize the input: Convert control charts to spaces. Then trim. + auto clean = argument; + for (auto& c : clean) + if (c <= 32) + c = ' '; + + A2 arg (Lexer::trim (clean), Lexer::Type::word); arg.tag ("ORIGINAL"); _original_args.push_back (arg);