Browse Source

xlate: more sed escaping

master
vampirefrog 2 years ago
parent
commit
cad555cc09
  1. 3
      xlate.c

3
xlate.c

@ -21,7 +21,8 @@ int main(int argc, char **argv) {
}
printf("/");
for(unsigned char *c = to; *c; c++) {
if(*c == '/') printf("\\%c", *c);
if(strchr("/", *c)) printf("\\%c", *c);
else if(strchr("'", *c)) printf("',$%02x,'", *c);
else printf("%c", *c);
}
printf("/g\n");

Loading…
Cancel
Save