From bf5c917b72bf832a7d7858cdf81f88ad8c1c0146 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 24 Jan 2016 09:12:59 +0000 Subject: [PATCH] Check for quotes in SplitNameValue and remove them if needed. --- source/common/text.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/common/text.cpp b/source/common/text.cpp index 8237440..df64411 100644 --- a/source/common/text.cpp +++ b/source/common/text.cpp @@ -172,6 +172,17 @@ PropertyNameValue SplitNameValue(string InputData){ } + // Check if the value has quotes at the start and end. + // Remove them if this is the case. + + if (FinalNameValue.Value.front() == '\"' && + FinalNameValue.Value.back() == '\"'){ + + FinalNameValue.Value.erase(0, 1); + FinalNameValue.Value.erase((FinalNameValue.Value.size() - 1), 1); + + } + return FinalNameValue; } \ No newline at end of file -- 2.39.5