Fix issue #10, newlines should be showing up now

Took 27 minutes
This commit is contained in:
2020-10-04 21:04:25 +02:00
parent 10ae17b246
commit c2fe6c4d08
4 changed files with 29 additions and 14 deletions

4
vendor/js/faq.js vendored
View File

@ -157,7 +157,9 @@ function openAnswerModal( id )
answerModalTitle.html( 'Answer ' + result.data.created_by + "'s question" );
if( result.data.answer !== null && result.data.answer.length > 5 )
{
answerText.val( result.data.answer );
let this_answer = result.data.answer;
this_answer.replace(/(?:\r\n|\r|\n)/g, '<br>');
answerText.val( this_answer );
}
else
{