More input padding and stricter sanitation

This commit is contained in:
Cohee 2023-12-10 15:07:39 +02:00
parent 36438394a2
commit 5f1683f43a
2 changed files with 2 additions and 2 deletions

View File

@ -1494,7 +1494,7 @@ function messageFormatting(mes, ch_name, isSystem, isUser) {
mes = mes.replace(new RegExp(`(^|\n)${ch_name}:`, 'g'), '$1');
}
mes = DOMPurify.sanitize(mes);
mes = DOMPurify.sanitize(mes, { FORBID_TAGS: ['style'] });
return mes;
}

View File

@ -902,7 +902,7 @@ export function initRossMods() {
const chatBlock = $('#chat');
const originalScrollBottom = chatBlock[0].scrollHeight - (chatBlock.scrollTop() + chatBlock.outerHeight());
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) {
const newScrollTop = Math.round(chatBlock[0].scrollHeight - (chatBlock.outerHeight() + originalScrollBottom));