diff --git a/locallib.php b/locallib.php
index 2b4d8d38752127871da95b58decdf4c8641ae151..9a869421146fd0218f022d31add93fcbbc3223dc 100644
--- a/locallib.php
+++ b/locallib.php
@@ -63,7 +63,7 @@ function pdfannotator_display_embed($pdfannotator, $cm, $course, $file, $page =
     // Load and execute the javascript files.
     $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/pdf.js?ver=00002"));
     $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/textclipper.js"));
-    $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00026"));
+    $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/index.js?ver=00027"));
     $PAGE->requires->js(new moodle_url("/mod/pdfannotator/shared/locallib.js?ver=00005"));
 
     // Pass parameters from PHP to JavaScript.
@@ -660,7 +660,7 @@ function pdfannotator_process_latex_moodle($context, $string) {
     // thing needed here.
     $imageinfo = getimagesize($image);
     $result['mathformheight'] = $imageinfo[1];
-    $result['extension'] = 'PNG';
+    $result['format'] = 'PNG';
     return $result;
 }
 /**
@@ -1422,9 +1422,6 @@ function pdfannotator_get_answers_for_this_user($courseid, $context, $answerfilt
             $entry->displayhidden = true;
         }
 
-        $entry->answeredquestion = format_text($entry->answeredquestion, $options = ['filter' => true]);
-        $entry->answer = format_text($entry->answer, $options = ['filter' => true]);
-
         $res[] = $entry;
     }
 
@@ -2027,7 +2024,10 @@ function pdfannotator_answerstable_add_row($thiscourse, $table, $answer, $cmid,
     global $CFG, $PAGE;
 
     $answer->answer = pdfannotator_get_relativelink($answer->answer, $answer->answerid, $context);
+    $answer->answer = format_text($answer->answer, $options = ['filter' => true]);
     $answer->answeredquestion = pdfannotator_get_relativelink($answer->answeredquestion, $answer->questionid, $context);
+    $answer->answeredquestion = format_text($answer->answeredquestion, $options = ['filter' => true]);
+
 
     if (isset($answer->displayquestionhidden)) {
         $question = "<a class='" . $answer->annoid . " more dimmed' href=$answer->questionlink>$answer->answeredquestion</a>";
diff --git a/shared/index.js b/shared/index.js
index b56e412c0b1e3596e6a5947f395468fdd7519033..0a3d98b850ad5cbdf33ab74462d1ba644e65498d 100644
--- a/shared/index.js
+++ b/shared/index.js
@@ -2008,12 +2008,10 @@ function startIndex(Y,_cm,_documentObject,_contextId, _userid,_capabilities, _to
                     var isquestion = 0; // this is a normal comment, so it is not a question
                     var commentContentElements = document.querySelectorAll('#id_pdfannotator_contenteditable')[0];
                     var imgContents = commentContentElements.querySelectorAll('img');
-                    if(commentContentElements.innerText.replace('/\n/g', '').trim() === '') {
-                        isEmptyContent = true;
-                    }
+                    var innerContent = commentContentElements.innerText.replace('/\n/g', '').trim();
                     var temp = commentContentElements.querySelectorAll('p')[0];
                     if(temp) {
-                        if (temp.innerText.replace('/\n/g', '').trim() === '' && imgContents.length === 0) {
+                        if ((temp.innerText.replace('/\n/g', '').trim() === '' && imgContents.length === 0) || innerContent === '') {
                             isEmptyContent = true;
                         }
                     }
diff --git a/version.php b/version.php
index 774037205002f7356ed01a6649e50a3998482850..e014b28ab118506ea7f2c0b11e894188d3f42a51 100644
--- a/version.php
+++ b/version.php
@@ -25,7 +25,7 @@
 defined('MOODLE_INTERNAL') || die();
 
 $plugin->component = 'mod_pdfannotator';
-$plugin->version   = 2022083000;
+$plugin->version   = 2022090500;
 $plugin->release  = 'PDF Annotator v1.4 release 11';
 $plugin->requires  = 2021051700;
 $plugin->maturity  = MATURITY_STABLE;