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

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

parent c8497596
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include "su.hpp" #include "su.hpp"
#include "daemon.hpp" #include "daemon.hpp"
extern int SDK_INT;
using namespace std; using namespace std;
#define CALL_PROVIDER \ #define CALL_PROVIDER \
...@@ -81,7 +83,14 @@ public: ...@@ -81,7 +83,14 @@ public:
break; break;
case STRING: case STRING:
str += ":s:"; str += ":s:";
if (SDK_INT >= 30) {
string tmp = str_val;
replace_all(tmp, "\\", "\\\\");
replace_all(tmp, ":", "\\:");
str += tmp;
} else {
str += str_val; str += str_val;
}
break; break;
} }
vec.push_back("--extra"); 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