mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
More input padding and stricter sanitation
This commit is contained in:
@ -1494,7 +1494,7 @@ function messageFormatting(mes, ch_name, isSystem, isUser) {
|
|||||||
mes = mes.replace(new RegExp(`(^|\n)${ch_name}:`, 'g'), '$1');
|
mes = mes.replace(new RegExp(`(^|\n)${ch_name}:`, 'g'), '$1');
|
||||||
}
|
}
|
||||||
|
|
||||||
mes = DOMPurify.sanitize(mes);
|
mes = DOMPurify.sanitize(mes, { FORBID_TAGS: ['style'] });
|
||||||
|
|
||||||
return mes;
|
return mes;
|
||||||
}
|
}
|
||||||
|
@ -902,7 +902,7 @@ export function initRossMods() {
|
|||||||
const chatBlock = $('#chat');
|
const chatBlock = $('#chat');
|
||||||
const originalScrollBottom = chatBlock[0].scrollHeight - (chatBlock.scrollTop() + chatBlock.outerHeight());
|
const originalScrollBottom = chatBlock[0].scrollHeight - (chatBlock.scrollTop() + chatBlock.outerHeight());
|
||||||
this.style.height = window.getComputedStyle(this).getPropertyValue('min-height');
|
this.style.height = window.getComputedStyle(this).getPropertyValue('min-height');
|
||||||
this.style.height = this.scrollHeight + 0.1 + 'px';
|
this.style.height = this.scrollHeight + 0.3 + 'px';
|
||||||
|
|
||||||
if (!isFirefox) {
|
if (!isFirefox) {
|
||||||
const newScrollTop = Math.round(chatBlock[0].scrollHeight - (chatBlock.outerHeight() + originalScrollBottom));
|
const newScrollTop = Math.round(chatBlock[0].scrollHeight - (chatBlock.outerHeight() + originalScrollBottom));
|
||||||
|
Reference in New Issue
Block a user