summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/functions.php2
-rw-r--r--post.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 2915e1b6..4af7891a 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -1523,7 +1523,7 @@ function markup(&$body, $track_cites = false) {
}
function utf8tohtml($utf8) {
- return htmlspecialchars($utf8, ENT_NOQUOTES, 'UTF-8');
+ return mb_encode_numericentity(htmlspecialchars($utf8, ENT_NOQUOTES, 'UTF-8'), array(0x010000, 0xffffff, 0, 0xffffff), 'UTF-8');
}
function ordutf8($string, &$offset) {
diff --git a/post.php b/post.php
index ad045b66..e9041ce8 100644
--- a/post.php
+++ b/post.php
@@ -378,7 +378,7 @@ if (isset($_POST['delete'])) {
wordfilters($post['body']);
- $post['body_nomarkup'] = $post['body'];
+ $post['body_nomarkup'] = preg_replace('/[\x{010000}-\x{ffffff}]/u', '', $post['body']);
if (!($mod && isset($post['raw']) && $post['raw']))
$post['tracked_cites'] = markup($post['body'], true);