Add support for [Measure:EscapeUrl] to perform URL encoding

This commit is contained in:
Birunthan Mohanathas
2014-01-04 19:19:10 +02:00
parent 9b5871f4dc
commit cf62c509a1
4 changed files with 37 additions and 1 deletions

View File

@ -237,7 +237,8 @@ bool ConfigParser::GetSectionVariable(std::wstring& strVariable, std::wstring& s
Percentual,
Max,
Min,
EscapeRegExp
EscapeRegExp,
EscapeUrl
} valueType = ValueType::Raw;
if (isKeySelector)
@ -254,6 +255,10 @@ bool ConfigParser::GetSectionVariable(std::wstring& strVariable, std::wstring& s
{
valueType = ValueType::EscapeRegExp;
}
else if (_wcsicmp(selectorSz, L"EscapeUrl") == 0)
{
valueType = ValueType::EscapeUrl;
}
else
{
return false;
@ -299,6 +304,12 @@ bool ConfigParser::GetSectionVariable(std::wstring& strVariable, std::wstring& s
StringUtil::EscapeRegExp(strValue);
return true;
}
else if (valueType == ValueType::EscapeUrl)
{
strValue = measure->GetStringValue();
StringUtil::EscapeUrl(strValue);
return true;
}
int scale = 1;