aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/url.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2012-12-14 09:28:44 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2012-12-14 09:29:46 -0600
commitcc81b5e55e6cead9e926e8ca11876f8511e6d4c6 (patch)
tree9355553c9c8dd6ccc47c1e90d1a33066da971588 /mediagoblin/tools/url.py
parentc843de8a57a24930e2c04c88a0201937937710bb (diff)
downloadmediagoblin-cc81b5e55e6cead9e926e8ca11876f8511e6d4c6.tar.lz
mediagoblin-cc81b5e55e6cead9e926e8ca11876f8511e6d4c6.tar.xz
mediagoblin-cc81b5e55e6cead9e926e8ca11876f8511e6d4c6.zip
Add comments explaining how translitcodec *is* used
Diffstat (limited to 'mediagoblin/tools/url.py')
-rw-r--r--mediagoblin/tools/url.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mediagoblin/tools/url.py b/mediagoblin/tools/url.py
index 7477173a..de16536c 100644
--- a/mediagoblin/tools/url.py
+++ b/mediagoblin/tools/url.py
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import re
+# This import *is* used; see word.encode('tranlit/long') below.
import translitcodec
@@ -27,6 +28,7 @@ def slugify(text, delim=u'-'):
"""
result = []
for word in _punct_re.split(text.lower()):
+ # Uses translitcodec!
word = word.encode('translit/long')
if word:
result.append(word)