Permalink
Cannot retrieve contributors at this time
15 lines (15 sloc)
504 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #$c->{optional_filename_sanitise} = sub | |
| #{ | |
| # my ($repo, $filepath) = @_; | |
| # | |
| # # To sanitise characters that get encoded in HTTP, or for any other reason | |
| # # Uncomment any of these substitutions to use them or add your own | |
| # | |
| # #$filepath =~ s!\s!_!g; # convert white space to underscore | |
| # #$filepath =~ s!\x28!_!g; # convert left bracket to underscore | |
| # #$filepath =~ s!\x29!_!g; # convert right bracket to underscore | |
| # #$filepath =~ s!\x40!_!g; # convert at sign to underscore | |
| # | |
| # return $filepath; | |
| # | |
| #}; |