Automatically add https:// to go links without.
This commit is contained in:
parent
67902cfa8a
commit
83d1fbfc48
1 changed files with 9 additions and 1 deletions
10
app/db.py
10
app/db.py
|
@ -108,7 +108,15 @@ class Subnode:
|
||||||
|
|
||||||
def go(self):
|
def go(self):
|
||||||
# returns a set of go links contained in this node
|
# returns a set of go links contained in this node
|
||||||
return subnode_to_actions(self, 'go')
|
golinks = subnode_to_actions(self, 'go')
|
||||||
|
sanitized_golinks = []
|
||||||
|
for golink in golinks:
|
||||||
|
if golink.startswith('http'):
|
||||||
|
sanitized_golinks.append(golink)
|
||||||
|
else:
|
||||||
|
# hack hack.
|
||||||
|
sanitized_golinks.append('https://' + golink)
|
||||||
|
return sanitized_golinks
|
||||||
|
|
||||||
|
|
||||||
def subnode_to_actions(subnode, action):
|
def subnode_to_actions(subnode, action):
|
||||||
|
|
Loading…
Reference in a new issue