viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

Fixes bug caused by editing comments that had math in them, a=chris

Chris Pollett [2022-11-23 22:Nov:rd]
Fixes bug caused by editing comments that had math in them, a=chris
Filename
src/views/elements/GroupfeedElement.php
diff --git a/src/views/elements/GroupfeedElement.php b/src/views/elements/GroupfeedElement.php
index e2e04e713..2c1658886 100644
--- a/src/views/elements/GroupfeedElement.php
+++ b/src/views/elements/GroupfeedElement.php
@@ -468,7 +468,8 @@ class GroupfeedElement extends Element implements CrawlConstants
                     isset($page['OLD_DESCRIPTION'])){
                     ?>
                     <div id='old-description<?= $page['ID'] ?>'
-                        class='none'><?=$page['OLD_DESCRIPTION'] ?></div>
+                        class='none'><?=str_replace('`', '@BT@',
+                            $page['OLD_DESCRIPTION']) ?></div>
                     <?php
                 }
             }
@@ -867,6 +868,7 @@ class GroupfeedElement extends Element implements CrawlConstants
                 }
             }
             let description = elt('old-description'+id).innerHTML;
+            description = description.replaceAll('@BT@', '`');
             let tmp = '<div class="post<?= $clear ?>"></div>';
             start_elt = elt(id).innerHTML.substr(0, tmp.length)
             if (start_elt != tmp) {
ViewGit