mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Add support for [Measure:EscapeUrl] to perform URL encoding
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user