mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 16:27:38 +02:00
[ticket/16153] Use new function
PHPBB3-16153
This commit is contained in:
@@ -1182,20 +1182,10 @@ if ($submit || $preview || $refresh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace Emojis and other 4bit UTF-8 chars, not allowed by utf8_bin MySql, to NCR.
|
* Replace Emojis and other 4bit UTF-8 chars not allowed by MySql to UCR / NCR.
|
||||||
* Using their Numeric Character Reference's Hexadecimal notation.
|
* Using their Numeric Character Reference's Hexadecimal notation.
|
||||||
* Doesn't interfere with Japanese or Cyrillic etc.
|
|
||||||
*
|
|
||||||
* @see https://www.w3.org/TR/xml11/
|
|
||||||
* @see https://www.opentag.com/xfaq_charrep.htm
|
|
||||||
*/
|
*/
|
||||||
if (preg_match_all('/[\x{10000}-\x{10FFFF}]/u', $post_data['post_subject'], $matches))
|
$post_data['post_subject'] = utf8_encode_ucr($post_data['post_subject']);
|
||||||
{
|
|
||||||
foreach ($matches as $key => $emoji)
|
|
||||||
{
|
|
||||||
$post_data['post_subject'] = str_replace($emoji, utf8_encode_ncr($emoji), $post_data['post_subject']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This should never happen again.
|
* This should never happen again.
|
||||||
|
Reference in New Issue
Block a user