… | |
… | |
1448 | } |
1448 | } |
1449 | } |
1449 | } |
1450 | } |
1450 | } |
1451 | |
1451 | |
1452 | # helper function, quote string as perl without allowing |
1452 | # helper function, quote string as perl without allowing |
1453 | # any code execution or other shenanigans. does not |
1453 | # any code execution or other shenanigans. |
1454 | # support binary NULs in string. |
|
|
1455 | sub q0 { |
1454 | sub q0 { |
1456 | (my $str = shift) =~ s/\x00//g; # make sure there really aren't any embedded NULs |
1455 | "qq\x00\Q$_[0]\E\x00" |
1457 | "q\x00$str\x00" |
|
|
1458 | } |
1456 | } |
1459 | |
1457 | |
1460 | sub old_bg_expr { |
1458 | sub old_bg_expr { |
1461 | my ($self) = @_; |
1459 | my ($self) = @_; |
1462 | |
1460 | |