mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Only sanitize script output when viewing the logs in the UI
This commit is contained in:
parent
fabced9942
commit
32df79bb83
2 changed files with 7 additions and 5 deletions
|
@ -2310,13 +2310,13 @@ class WebInterface(object):
|
|||
try:
|
||||
temp_loglevel_and_time = l.split(' - ', 1)
|
||||
loglvl = temp_loglevel_and_time[1].split(' ::', 1)[0].strip()
|
||||
msg = unicode(l.split(' : ', 1)[1].replace('\n', ''), 'utf-8')
|
||||
msg = helpers.sanitize(unicode(l.split(' : ', 1)[1].replace('\n', ''), 'utf-8'))
|
||||
fa([temp_loglevel_and_time[0], loglvl, msg])
|
||||
except IndexError:
|
||||
# Add traceback message to previous msg.
|
||||
tl = (len(filt) - 1)
|
||||
n = len(l) - len(l.lstrip(' '))
|
||||
ll = ' ' * (2 * n) + unicode(l[n:], 'utf-8')
|
||||
ll = ' ' * (2 * n) + helpers.sanitize(unicode(l[n:], 'utf-8'))
|
||||
filt[tl][2] += '<br>' + ll
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue