mirror of https://github.com/mpv-player/mpv
file2string: mark question mark as non-safe
Escaping all question marks as well, they can be used to form trigraph characters which are effective even within string literal.
This commit is contained in:
parent
4c43c30421
commit
3f73d63523
|
@ -9,8 +9,8 @@ use warnings;
|
||||||
# the exact contents of the original file.
|
# the exact contents of the original file.
|
||||||
# FIXME: why not a char array?
|
# FIXME: why not a char array?
|
||||||
|
|
||||||
# treat only alphanumeric and not-" punctuation as safe
|
# treat only alphanumeric and punctuations (excluding " and ?) as safe
|
||||||
my $unsafe_chars = qr{[^][A-Za-z0-9!#%&'()*+,./:;<=>?^_{|}~ -]};
|
my $unsafe_chars = qr{[^][A-Za-z0-9!#%&'()*+,./:;<=>^_{|}~ -]};
|
||||||
|
|
||||||
for my $file (@ARGV) {
|
for my $file (@ARGV) {
|
||||||
open my $fh, '<:raw', $file or next;
|
open my $fh, '<:raw', $file or next;
|
||||||
|
|
Loading…
Reference in New Issue