From: Steve Brokenshire Date: Sun, 24 Jan 2016 09:12:59 +0000 (+0000) Subject: Check for quotes in SplitNameValue and remove them if needed. X-Git-Tag: release-0.02~702 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=bf5c917b72bf832a7d7858cdf81f88ad8c1c0146;p=xestiacalendar%2F.git Check for quotes in SplitNameValue and remove them if needed. --- 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