Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions api/models/eula.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ def __init__(self, text, url=None, title=None, html=None, driver=None, desk_driv
self.mobile_driver = mobile_driver

# Set title to page title and format for length. URLs stay full length
if title is not None and title is not '' and title is not ' ':
if len(title) > 40:
self.title = title[:37] + '...'
else:
self.title = title
else:
self.title = url
# Build the string to remove invisible characters and ensure it's not just spaces
title = ''.join(char for char in title if char in printable).strip()
if title is None or title is '':
title = url

if len(title) > 40:
self.title = title[:37] + '...'
else:
self.title = title
2 changes: 1 addition & 1 deletion app/app/templates/processing/eula.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<br/>
<br/>
<p class='help-text'>
Please do not close or refresh the page
Please do not close or refresh the page - EULA processing can take up to 15 seconds
</p>
<br/>
</div>
Expand Down