feat: Remove slash from HNSChat name before saving
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 19s
Build Docker / Build Main Image (push) Successful in 20s

This commit is contained in:
Nathan Woodburn 2023-11-18 19:27:05 +11:00
parent 1c0e0059c1
commit 8f1b141828
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 15 additions and 12 deletions

25
main.py
View File

@ -199,17 +199,20 @@ def send_edit():
# Json data
data = db.get_website_data_raw(user['domain'])
data['data'] = request.form['data']
data['HNS'] = request.form['hns']
data['BTC'] = request.form['btc']
data['ETH'] = request.form['eth']
data['hnschat'] = request.form['hnschat']
data['location'] = request.form['location']
data['bg_colour'] = request.form['bg_colour']
data['fg_colour'] = request.form['fg_colour']
data['text_colour'] = request.form['text_colour']
data['email'] = request.form['email']
data['template'] = request.form['template']
data['data'] = request.form['data'].strip()
data['HNS'] = request.form['hns'].strip()
data['BTC'] = request.form['btc'].strip()
data['ETH'] = request.form['eth'].strip()
data['hnschat'] = request.form['hnschat'].strip()
data['hnschat'] = data['hnschat'].replace("/","").strip()
data['location'] = request.form['location'].strip()
data['bg_colour'] = request.form['bg_colour'].strip()
data['fg_colour'] = request.form['fg_colour'].strip()
data['text_colour'] = request.form['text_colour'].strip()
data['email'] = request.form['email'].strip()
data['template'] = request.form['template'].strip()
if 'hip2_display' in request.form:
data['hip2_display'] = True

View File

@ -74,7 +74,7 @@ def render(data,db_object):
hide_addresses = True
if hnschat != "":
hnschat = "<a href='https://hns.chat/#message:"+hnschat+"' target='_blank'><img src='"+hns_icon+"' width='20px' height='20px' style='margin-right: 5px;'>" + hnschat + "</a>"
hnschat = "<a href='https://hns.chat/#message:"+hnschat+"' target='_blank'><img src='"+hns_icon+"' width='20px' height='20px' style='margin-right: 5px;'>" + hnschat + "/</a>"
if location != "":
location = "<img src='"+location_icon+"' width='20px' height='30px' style='margin-right: 5px;'>" + location
if email != "":