fix: improve log rendering by removing unnecessary replacements and ensure safe HTML output

This commit is contained in:
Kamil
2024-12-10 21:48:18 +00:00
parent 79c9554ce2
commit 01cc78eb93
2 changed files with 3 additions and 2 deletions

View File

@@ -123,7 +123,7 @@ def view_logs():
if log_name == 'beat' and os.path.exists('/var/log/jellyplist_beat.log'):
with open('/var/log/jellyplist_beat.log', 'r',encoding='utf-8') as f:
logs = f.readlines()
return render_template('admin/logview.html', logs=str.join('',logs).replace('<',"_").replace('>',"_"),name=log_name)
return render_template('admin/logview.html', logs=str.join('',logs),name=log_name)
@app.route('/admin/setloglevel', methods=['POST'])
@functions.jellyfin_admin_required