mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/16981] Fix HTML-encoded emojis in email subject line
PHPBB3-16981
This commit is contained in:
@@ -150,7 +150,7 @@ class admin_activate_user extends \phpbb\notification\type\base
|
||||
$username = $this->user_loader->get_username($this->item_id, 'username');
|
||||
|
||||
return array(
|
||||
'USERNAME' => htmlspecialchars_decode($username, ENT_COMPAT),
|
||||
'USERNAME' => html_entity_decode($username, ENT_COMPAT),
|
||||
'U_USER_DETAILS' => "{$board_url}/memberlist.{$this->php_ext}?mode=viewprofile&u={$this->item_id}",
|
||||
'U_ACTIVATE' => "{$board_url}/ucp.{$this->php_ext}?mode=activate&u={$this->item_id}&k={$this->get_data('user_actkey')}",
|
||||
);
|
||||
|
@@ -120,7 +120,7 @@ class disapprove_post extends \phpbb\notification\type\approve_post
|
||||
public function get_email_template_variables()
|
||||
{
|
||||
return array_merge(parent::get_email_template_variables(), array(
|
||||
'REASON' => htmlspecialchars_decode($this->get_data('disapprove_reason'), ENT_COMPAT),
|
||||
'REASON' => html_entity_decode($this->get_data('disapprove_reason'), ENT_COMPAT),
|
||||
));
|
||||
}
|
||||
|
||||
|
@@ -120,7 +120,7 @@ class disapprove_topic extends \phpbb\notification\type\approve_topic
|
||||
public function get_email_template_variables()
|
||||
{
|
||||
return array_merge(parent::get_email_template_variables(), array(
|
||||
'REASON' => htmlspecialchars_decode($this->get_data('disapprove_reason'), ENT_COMPAT),
|
||||
'REASON' => html_entity_decode($this->get_data('disapprove_reason'), ENT_COMPAT),
|
||||
));
|
||||
}
|
||||
|
||||
|
@@ -130,10 +130,10 @@ class forum extends \phpbb\notification\type\post
|
||||
}
|
||||
|
||||
return [
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($username, ENT_COMPAT),
|
||||
'FORUM_NAME' => htmlspecialchars_decode(censor_text($this->get_data('forum_name')), ENT_COMPAT),
|
||||
'POST_SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($username, ENT_COMPAT),
|
||||
'FORUM_NAME' => html_entity_decode(censor_text($this->get_data('forum_name')), ENT_COMPAT),
|
||||
'POST_SUBJECT' => html_entity_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => html_entity_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
|
||||
'U_VIEW_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
|
||||
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?f={$this->get_data('forum_id')}&t={$this->item_parent_id}&e=1&view=unread#unread",
|
||||
|
@@ -133,8 +133,8 @@ class group_request extends \phpbb\notification\type\base
|
||||
$user_data = $this->user_loader->get_user($this->item_id);
|
||||
|
||||
return array(
|
||||
'GROUP_NAME' => htmlspecialchars_decode($this->get_data('group_name'), ENT_COMPAT),
|
||||
'REQUEST_USERNAME' => htmlspecialchars_decode($user_data['username'], ENT_COMPAT),
|
||||
'GROUP_NAME' => html_entity_decode($this->get_data('group_name'), ENT_COMPAT),
|
||||
'REQUEST_USERNAME' => html_entity_decode($user_data['username'], ENT_COMPAT),
|
||||
|
||||
'U_PENDING' => generate_board_url() . "/ucp.{$this->php_ext}?i=groups&mode=manage&action=list&g={$this->item_parent_id}",
|
||||
'U_GROUP' => generate_board_url() . "/memberlist.{$this->php_ext}?mode=group&g={$this->item_parent_id}",
|
||||
|
@@ -164,8 +164,8 @@ class pm extends \phpbb\notification\type\base
|
||||
$user_data = $this->user_loader->get_user($this->get_data('from_user_id'));
|
||||
|
||||
return array(
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($user_data['username'], ENT_COMPAT),
|
||||
'SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($user_data['username'], ENT_COMPAT),
|
||||
'SUBJECT' => html_entity_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
|
||||
'U_VIEW_MESSAGE' => generate_board_url() . '/ucp.' . $this->php_ext . "?i=pm&mode=view&p={$this->item_id}",
|
||||
);
|
||||
|
@@ -262,9 +262,9 @@ class post extends \phpbb\notification\type\base
|
||||
}
|
||||
|
||||
return array(
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($username, ENT_COMPAT),
|
||||
'POST_SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($username, ENT_COMPAT),
|
||||
'POST_SUBJECT' => html_entity_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => html_entity_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
|
||||
'U_VIEW_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
|
||||
'U_NEWEST_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?t={$this->item_parent_id}&e=1&view=unread#unread",
|
||||
|
@@ -168,7 +168,7 @@ class quote extends \phpbb\notification\type\post
|
||||
$user_data = $this->user_loader->get_user($this->get_data('poster_id'));
|
||||
|
||||
return array_merge(parent::get_email_template_variables(), array(
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($user_data['username'], ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($user_data['username'], ENT_COMPAT),
|
||||
));
|
||||
}
|
||||
|
||||
|
@@ -143,11 +143,11 @@ class report_pm extends \phpbb\notification\type\pm
|
||||
$user_data = $this->user_loader->get_user($this->get_data('from_user_id'));
|
||||
|
||||
return [
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($user_data['username'], ENT_COMPAT),
|
||||
'SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($user_data['username'], ENT_COMPAT),
|
||||
'SUBJECT' => html_entity_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
|
||||
/** @deprecated 3.2.6-RC1 (to be removed in 4.0.0) use {SUBJECT} instead in report_pm.txt */
|
||||
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => html_entity_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
|
||||
'U_VIEW_REPORT' => generate_board_url() . "/mcp.{$this->php_ext}?r={$this->item_parent_id}&i=pm_reports&mode=pm_report_details",
|
||||
];
|
||||
|
@@ -104,9 +104,9 @@ class report_pm_closed extends \phpbb\notification\type\pm
|
||||
$closer_username = $this->user_loader->get_username($this->get_data('closer_id'), 'username');
|
||||
|
||||
return [
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($sender_username, ENT_COMPAT),
|
||||
'CLOSER_NAME' => htmlspecialchars_decode($closer_username, ENT_COMPAT),
|
||||
'SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($sender_username, ENT_COMPAT),
|
||||
'CLOSER_NAME' => html_entity_decode($closer_username, ENT_COMPAT),
|
||||
'SUBJECT' => html_entity_decode(censor_text($this->get_data('message_subject')), ENT_COMPAT),
|
||||
|
||||
'U_VIEW_MESSAGE'=> generate_board_url() . "/ucp.{$this->php_ext}?i=pm&mode=view&p={$this->item_id}",
|
||||
];
|
||||
|
@@ -110,8 +110,8 @@ class report_post extends \phpbb\notification\type\post_in_queue
|
||||
$board_url = generate_board_url();
|
||||
|
||||
return array(
|
||||
'POST_SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
'POST_SUBJECT' => html_entity_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => html_entity_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
|
||||
'U_VIEW_REPORT' => "{$board_url}/mcp.{$this->php_ext}?p={$this->item_id}&i=reports&mode=report_details#reports",
|
||||
'U_VIEW_POST' => "{$board_url}/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
|
||||
|
@@ -111,10 +111,10 @@ class report_post_closed extends \phpbb\notification\type\post
|
||||
$closer_username = $this->user_loader->get_username($this->get_data('closer_id'), 'username');
|
||||
|
||||
return [
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($post_username, ENT_COMPAT),
|
||||
'CLOSER_NAME' => htmlspecialchars_decode($closer_username, ENT_COMPAT),
|
||||
'POST_SUBJECT' => htmlspecialchars_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($post_username, ENT_COMPAT),
|
||||
'CLOSER_NAME' => html_entity_decode($closer_username, ENT_COMPAT),
|
||||
'POST_SUBJECT' => html_entity_decode(censor_text($this->get_data('post_subject')), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => html_entity_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
|
||||
'U_VIEW_POST' => generate_board_url() . "/viewtopic.{$this->php_ext}?p={$this->item_id}#p{$this->item_id}",
|
||||
];
|
||||
|
@@ -217,9 +217,9 @@ class topic extends \phpbb\notification\type\base
|
||||
}
|
||||
|
||||
return array(
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($username, ENT_COMPAT),
|
||||
'FORUM_NAME' => htmlspecialchars_decode($this->get_data('forum_name'), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
'AUTHOR_NAME' => html_entity_decode($username, ENT_COMPAT),
|
||||
'FORUM_NAME' => html_entity_decode($this->get_data('forum_name'), ENT_COMPAT),
|
||||
'TOPIC_TITLE' => html_entity_decode(censor_text($this->get_data('topic_title')), ENT_COMPAT),
|
||||
|
||||
'U_TOPIC' => "{$board_url}/viewtopic.{$this->php_ext}?t={$this->item_id}",
|
||||
'U_VIEW_TOPIC' => "{$board_url}/viewtopic.{$this->php_ext}?t={$this->item_id}",
|
||||
|
Reference in New Issue
Block a user