Allowing html content in answerModal

Took 12 minutes
This commit is contained in:
2020-10-04 21:26:12 +02:00
parent e31809f722
commit 33fcaa4b2e
2 changed files with 16 additions and 7 deletions

2
vendor/js/faq.js vendored
View File

@ -158,6 +158,8 @@ function openAnswerModal( id )
if( result.data.answer !== null && result.data.answer.length > 5 )
{
let this_answer = result.data.answer;
this_answer = new DOMParser().parseFromString(this_answer, "text/html").documentElement.textContent;
this_answer.replace(/(?:\r\n|\r|\n)/g, '<br>');
answerText.val( this_answer );
}