mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2024-12-27 08:42:53 +01:00
Hotfix: HTML escaped story output. Shodan can no longer run JS popups in your browser.
This commit is contained in:
parent
de1f8f94e0
commit
1e95f7e1a5
@ -10,6 +10,7 @@ import tkinter as tk
|
||||
from tkinter import messagebox
|
||||
import json
|
||||
import requests
|
||||
import html
|
||||
|
||||
# KoboldAI
|
||||
import fileops
|
||||
@ -1092,7 +1093,7 @@ def applyoutputformatting(txt):
|
||||
def refresh_story():
|
||||
text_parts = ['<chunk n="0" id="n0">', vars.prompt, '</chunk>']
|
||||
for idx, item in enumerate(vars.actions, start=1):
|
||||
text_parts.extend(('<chunk n="', str(idx), '" id="n', str(idx), '">', item, '</chunk>'))
|
||||
text_parts.extend(('<chunk n="', str(idx), '" id="n', str(idx), '">', html.escape(item), '</chunk>'))
|
||||
emit('from_server', {'cmd': 'updatescreen', 'data': formatforhtml(''.join(text_parts))})
|
||||
|
||||
#==================================================================#
|
||||
|
Loading…
Reference in New Issue
Block a user