Remove bookmark endings from post ids

main
Bob Mottram 2021-12-06 11:12:06 +00:00
parent 395891dd1f
commit b3e57c5fde
3 changed files with 4 additions and 2 deletions

View File

@ -2157,6 +2157,8 @@ class PubServer(BaseHTTPRequestHandler):
resetThemeDesignerSettings(baseDir, themeName, domain,
allowLocalNetworkAccess,
systemLanguage)
setTheme(baseDir, themeName, domain,
allowLocalNetworkAccess, systemLanguage)
if callingDomain.endswith('.onion') and onionDomain:
originPathStr = \

View File

@ -513,8 +513,6 @@ def resetThemeDesignerSettings(baseDir: str, themeName: str, domain: str,
os.remove(customVariablesFile)
except OSError:
print('EX: unable to remove theme designer settings on reset')
setTheme(baseDir, themeName, domain,
allowLocalNetworkAccess, systemLanguage)
def _readVariablesFile(baseDir: str, themeName: str,

View File

@ -595,6 +595,8 @@ def removeIdEnding(idStr: str) -> str:
idStr = idStr[:-len('/event')]
elif idStr.endswith('/replies'):
idStr = idStr[:-len('/replies')]
if '#' in idStr:
idStr = idStr.split('#')[0]
return idStr