Skip to content
Snippets Groups Projects
Commit 284ca73b authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] pad: etherpad limits pad id length to 50

parent aa10972d
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,9 @@ class pad_common(osv.osv_memory): ...@@ -37,7 +37,9 @@ class pad_common(osv.osv_memory):
s = string.ascii_uppercase + string.digits s = string.ascii_uppercase + string.digits
salt = ''.join([s[random.randint(0, len(s) - 1)] for i in range(10)]) salt = ''.join([s[random.randint(0, len(s) - 1)] for i in range(10)])
#path #path
path = '%s-%s-%s' % (cr.dbname.replace('_','-'), self._name, salt) # etherpad hardcodes pad id length limit to 50
path = '-%s-%s' % (self._name, salt)
path = '%s%s' % (cr.dbname.replace('_','-')[0:50 - len(path)], path)
# contruct the url # contruct the url
url = '%s/p/%s' % (pad["server"], path) url = '%s/p/%s' % (pad["server"], path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment