From b3e57c5fdeaa52e7b267e91a1362cf2e22d31d8c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 6 Dec 2021 11:12:06 +0000 Subject: [PATCH] Remove bookmark endings from post ids --- daemon.py | 2 ++ theme.py | 2 -- utils.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index c0244a4fd..a5a50f493 100644 --- a/daemon.py +++ b/daemon.py @@ -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 = \ diff --git a/theme.py b/theme.py index b6a02d679..cf8cb00bb 100644 --- a/theme.py +++ b/theme.py @@ -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, diff --git a/utils.py b/utils.py index 077839ef0..60852f336 100644 --- a/utils.py +++ b/utils.py @@ -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