From 741806f1acafcfcbc8446c1be3f5afccb5f72c9f Mon Sep 17 00:00:00 2001 From: Rachel Fish Date: Thu, 13 Jul 2023 19:59:15 -0600 Subject: [PATCH] Fix emoji support when previewing posts --- config/themes/default/Post.template.php | 8 ++++---- wwwroot/Themes/default/Post.template.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/themes/default/Post.template.php b/config/themes/default/Post.template.php index 69a71a3..85c0cf9 100755 --- a/config/themes/default/Post.template.php +++ b/config/themes/default/Post.template.php @@ -204,7 +204,7 @@ function generateDays() // Justin Nov 24 2016 - Message icons have been removed. Left in some empty containers so the style doesn't get messed up. - echo '
'; + echo '
'; // Are you posting a calendar event? @@ -538,7 +538,7 @@ function addAttachment() ', template_control_verification($context['visual_verification_id'], 'all'), ' '; } - + if($context['require_verification'] && $modSettings['visual_verification_type'] == 6) { echo ' @@ -631,9 +631,9 @@ function previewPost() { // Handle the WYSIWYG editor. if (textFields[i] == ', JavaScriptEscape($context['post_box_name']), ' && ', JavaScriptEscape('oEditorHandle_' . $context['post_box_name']), ' in window && oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled) - x[x.length] = \'message_mode=1&\' + textFields[i] + \'=\' + oEditorHandle_', $context['post_box_name'], '.getText(false).replace(/&#/g, \'&#\').php_to8bit().php_urlencode(); + x[x.length] = textFields[i] + \'=\' + $("#', $context['post_box_name'], '").data("sceditor").getText().replace(/&#/g, \'&#\'); else - x[x.length] = textFields[i] + \'=\' + document.forms.postmodify[textFields[i]].value.replace(/&#/g, \'&#\').php_to8bit().php_urlencode(); + x[x.length] = textFields[i] + \'=\' + document.forms.postmodify[textFields[i]].value.replace(/&#/g, \'&#\'); } for (var i = 0, n = numericFields.length; i < n; i++) if (numericFields[i] in document.forms.postmodify && \'value\' in document.forms.postmodify[numericFields[i]]) diff --git a/wwwroot/Themes/default/Post.template.php b/wwwroot/Themes/default/Post.template.php index 69a71a3..85c0cf9 100755 --- a/wwwroot/Themes/default/Post.template.php +++ b/wwwroot/Themes/default/Post.template.php @@ -204,7 +204,7 @@ function generateDays() // Justin Nov 24 2016 - Message icons have been removed. Left in some empty containers so the style doesn't get messed up. - echo '
'; + echo '
'; // Are you posting a calendar event? @@ -538,7 +538,7 @@ function addAttachment() ', template_control_verification($context['visual_verification_id'], 'all'), ' '; } - + if($context['require_verification'] && $modSettings['visual_verification_type'] == 6) { echo ' @@ -631,9 +631,9 @@ function previewPost() { // Handle the WYSIWYG editor. if (textFields[i] == ', JavaScriptEscape($context['post_box_name']), ' && ', JavaScriptEscape('oEditorHandle_' . $context['post_box_name']), ' in window && oEditorHandle_', $context['post_box_name'], '.bRichTextEnabled) - x[x.length] = \'message_mode=1&\' + textFields[i] + \'=\' + oEditorHandle_', $context['post_box_name'], '.getText(false).replace(/&#/g, \'&#\').php_to8bit().php_urlencode(); + x[x.length] = textFields[i] + \'=\' + $("#', $context['post_box_name'], '").data("sceditor").getText().replace(/&#/g, \'&#\'); else - x[x.length] = textFields[i] + \'=\' + document.forms.postmodify[textFields[i]].value.replace(/&#/g, \'&#\').php_to8bit().php_urlencode(); + x[x.length] = textFields[i] + \'=\' + document.forms.postmodify[textFields[i]].value.replace(/&#/g, \'&#\'); } for (var i = 0, n = numericFields.length; i < n; i++) if (numericFields[i] in document.forms.postmodify && \'value\' in document.forms.postmodify[numericFields[i]])