aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache/templates/urlescape
blob: 8feb7fa40b8bd02d1fc6ef9b5997a418f63e7337 (plain)
1
2
3
4
5
6
7
8
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")))