diff options
Diffstat (limited to 'modules/apache/templates/urlescape')
-rw-r--r-- | modules/apache/templates/urlescape | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/apache/templates/urlescape b/modules/apache/templates/urlescape new file mode 100644 index 00000000..8feb7fa4 --- /dev/null +++ b/modules/apache/templates/urlescape @@ -0,0 +1,9 @@ +#!/usr/bin/python3 -u +# URL escape each path given on stdin +import sys +import urllib.parse +while True: + l = sys.stdin.readline() + if not l: + break + print(urllib.parse.quote(l.rstrip("\n"))) |