mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 15:17:38 +00:00
Proper escape :
and \
when binding intent
This commit is contained in:
parent
c849759682
commit
88e8f2bf83
@ -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:
|
|||||||
break;
|
break;
|
||||||
case STRING:
|
case STRING:
|
||||||
str += ":s:";
|
str += ":s:";
|
||||||
str += str_val;
|
if (SDK_INT >= 30) {
|
||||||
|
string tmp = str_val;
|
||||||
|
replace_all(tmp, "\\", "\\\\");
|
||||||
|
replace_all(tmp, ":", "\\:");
|
||||||
|
str += tmp;
|
||||||
|
} else {
|
||||||
|
str += str_val;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
vec.push_back("--extra");
|
vec.push_back("--extra");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user