mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-01 17:25:02 +00:00
Fix client parse errors with '=' in remark strings (#632)
Replace every '=' with '-' in the remark string to avoid parse errors from the clients.
This commit is contained in:
1 parent
0ba0cdd18e
commit
09bb2909d0
1 file changed
+5
@@ -157,6 +157,11 @@ bool applyMatcher(const std::string &rule, std::string &real_rule, const Proxy &
|
||||
|
||||
void processRemark(std::string &oldremark, std::string &newremark, string_array &remarks_list, bool proc_comma = true)
|
||||
{
|
||||
// Replace every '=' with '-' in the remark string to avoid parse errors from the clients.
|
||||
// Surge is tested to yield an error when handling '=' in the remark string,
|
||||
// not sure if other clients have the same problem.
|
||||
std::replace(oldremark.begin(), oldremark.end(), '=', '-');
|
||||
|
||||
if(proc_comma)
|
||||
{
|
||||
if(oldremark.find(',') != std::string::npos)
|
||||
|
||||
Reference in new issue
Block a user