aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_wiki
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-06-01 01:33:56 -0400
committerbnewbold <bnewbold@manus.(none)>2007-06-01 01:33:56 -0400
commitaff6ddb6508f11cd7b6d17abac60d05ddc0e139b (patch)
tree48051b5deec211edc3f60b36c2348529450556e7 /bn_django/git_wiki
parent2fa8564ea60ffbd9c724a6e2724b0b31acd60926 (diff)
downloadbnewnet-aff6ddb6508f11cd7b6d17abac60d05ddc0e139b.tar.gz
bnewnet-aff6ddb6508f11cd7b6d17abac60d05ddc0e139b.zip
fixed slug method for quotes
Diffstat (limited to 'bn_django/git_wiki')
-rw-r--r--bn_django/git_wiki/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py
index 3023500..f0a7e9c 100644
--- a/bn_django/git_wiki/models.py
+++ b/bn_django/git_wiki/models.py
@@ -17,7 +17,7 @@ class Tree(models.Model):
type = 'tree'
def slug(self):
#TODO: secure this
- return ''.join(self.path.strip().lower().split())
+ return ''.join(self.path.replace('"','').replace("'","").strip().lower().split())
class Admin:
ordering = ['path','name']
@@ -72,7 +72,7 @@ class Item(models.Model):
type='blob'
def slug(self):
#TODO: secure this
- return ''.join(self.name.strip().lower().split())
+ return ''.join(self.name.replace('"','').replace("'","").strip().lower().split())
class Admin:
ordering = ['path','name']
@@ -173,7 +173,7 @@ def fromslug(reqslug):
ret.reqslug = '/'
return ret
- reqslug = ''.join(reqslug.strip().lower().split())
+ reqslug = ''.join(reqslug.replace('"','').replace("'","").strip().lower().split())
if reqslug[-1] == '/':
reqslug=reqslug[:-1]
itemtxt = commands.getoutput(GITPREFIX \
@@ -190,7 +190,7 @@ def fromslug(reqslug):
fpath = ' '.join(words[3:])
if fpath[-1] == '/':
fpath=fpath[:-1]
- if ''.join(fpath.strip().lower().split()) == reqslug:
+ if ''.join(fpath.replace('"','').replace("'","").strip().lower().split()) == reqslug:
hash = fhash
path = fpath
type = ftype