Unverified Commit 88e8f2bf authored by LoveSy's avatar LoveSy Committed by GitHub

Proper escape `:` and `\` when binding intent

parent c8497596
......@@ -7,6 +7,8 @@
#include "su.hpp"
#include "daemon.hpp"
extern int SDK_INT;
using namespace std;
#define CALL_PROVIDER \
......@@ -81,7 +83,14 @@ public:
break;
case STRING:
str += ":s:";
if (SDK_INT >= 30) {
string tmp = str_val;
replace_all(tmp, "\\", "\\\\");
replace_all(tmp, ":", "\\:");
str += tmp;
} else {
str += str_val;
}
break;
}
vec.push_back("--extra");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment