Assuming your Custom Dropdown will continue to stay non-searchable, we should be able to fix this with two changes.
First, the multi-line string you've created is not valid JavaScript. We need to either remove the new lines in the string, replace the apostrophes with backticks (`), or concatenate multiple strings together like this:
return 'abc' +
'def' +
'ghi';
Second, seek out this line in the code:
$('#[% QuestionName() %]_div .customdropdown_nonsearchablediv').text(text);
and replace it with this:
$('#[% QuestionName() %]_div .customdropdown_nonsearchablediv').html(text);