mirror of https://gitlab.com/bashrc2/epicyon
Url parsing
parent
167b7926fd
commit
e6991c8ac0
|
@ -14,6 +14,7 @@ except ImportError:
|
|||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Util import number
|
||||
import os
|
||||
import urllib.parse
|
||||
from session import getJson
|
||||
from cache import storeWebfingerInCache
|
||||
from cache import getWebfingerFromCache
|
||||
|
@ -220,8 +221,7 @@ def webfingerLookup(path: str, baseDir: str,
|
|||
else:
|
||||
if 'resource=acct%3A' in path:
|
||||
handle = path.split('resource=acct%3A')[1]
|
||||
handle = handle.replace('%40', '@', 1)
|
||||
handle = handle.replace('%3A', ':', 1).strip()
|
||||
handle = urllib.parse.unquote(handle.strip())
|
||||
if debug:
|
||||
print('DEBUG: WEBFINGER handle ' + handle)
|
||||
if not handle:
|
||||
|
|
|
@ -273,8 +273,7 @@ def htmlSearchSharedItems(translate: {},
|
|||
currPage = 1
|
||||
ctr = 0
|
||||
sharedItemsForm = ''
|
||||
searchStrLower = searchStr.replace('%2B', '+').replace('%40', '@')
|
||||
searchStrLower = searchStrLower.replace('%3A', ':').replace('%23', '#')
|
||||
searchStrLower = urllib.parse.unquote(searchStr)
|
||||
searchStrLower = searchStrLower.lower().strip('\n')
|
||||
searchStrLowerList = searchStrLower.split('+')
|
||||
cssFilename = baseDir + '/epicyon-profile.css'
|
||||
|
|
Loading…
Reference in New Issue