form encoding

main
Bob Mottram 2020-12-02 11:55:40 +00:00
parent 512d1811c5
commit ef4c45932b
2 changed files with 3 additions and 5 deletions

View File

@ -3019,7 +3019,7 @@ class PubServer(BaseHTTPRequestHandler):
editor = None editor = None
if nickname: if nickname:
editor = isEditor(baseDir, nickname) editor = isEditor(baseDir, nickname)
if not hashtag or not nickname or not editor: if not hashtag or not editor:
if callingDomain.endswith('.onion') and \ if callingDomain.endswith('.onion') and \
onionDomain: onionDomain:
actorStr = \ actorStr = \

View File

@ -676,13 +676,11 @@ def htmlHashtagSearch(cssCache: {},
if isEditor(baseDir, nickname): if isEditor(baseDir, nickname):
category = getHashtagCategory(baseDir, hashtag) category = getHashtagCategory(baseDir, hashtag)
hashtagSearchForm += '<div class="hashtagCategoryContainer">\n' hashtagSearchForm += '<div class="hashtagCategoryContainer">\n'
hashtagSearchForm += ' <form method="POST" action="' + \ hashtagSearchForm += ' <form enctype="multipart/form-data" ' + \
'method="POST" accept-charset="UTF-8" action="' + \
'/users/' + nickname + '/tags/' + hashtag + \ '/users/' + nickname + '/tags/' + hashtag + \
'/sethashtagcategory">\n' '/sethashtagcategory">\n'
hashtagSearchForm += ' <center>\n' hashtagSearchForm += ' <center>\n'
hashtagSearchForm += \
' <input type="hidden" name="hashtagName" value="' + \
hashtag + '">\n'
hashtagSearchForm += translate['Category'] hashtagSearchForm += translate['Category']
hashtagSearchForm += \ hashtagSearchForm += \
' <input type="text" style="width: 20ch" ' + \ ' <input type="text" style="width: 20ch" ' + \