mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 23:07:39 +02:00
[ticket/13803] Use accurate flags for generate_text_for_edit()
PHPBB3-13803
This commit is contained in:
@@ -175,14 +175,14 @@ abstract class base implements reparser_interface
|
|||||||
protected function reparse_record(array $record)
|
protected function reparse_record(array $record)
|
||||||
{
|
{
|
||||||
$record = $this->add_missing_fields($record);
|
$record = $this->add_missing_fields($record);
|
||||||
|
$flags = ($record['enable_bbcode']) ? OPTION_FLAG_BBCODE : 0;
|
||||||
|
$flags |= ($record['enable_smilies']) ? OPTION_FLAG_SMILIES : 0;
|
||||||
|
$flags |= ($record['enable_magic_url']) ? OPTION_FLAG_LINKS : 0;
|
||||||
$unparsed = array_merge(
|
$unparsed = array_merge(
|
||||||
$record,
|
$record,
|
||||||
generate_text_for_edit(
|
generate_text_for_edit($record['text'], $record['bbcode_uid'], $flags)
|
||||||
$record['text'],
|
|
||||||
$record['bbcode_uid'],
|
|
||||||
OPTION_FLAG_BBCODE | OPTION_FLAG_SMILIES | OPTION_FLAG_LINKS
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// generate_text_for_edit() and decode_message() actually return the text as HTML. It has to
|
// generate_text_for_edit() and decode_message() actually return the text as HTML. It has to
|
||||||
// be decoded to plain text before it can be reparsed
|
// be decoded to plain text before it can be reparsed
|
||||||
$text = html_entity_decode($unparsed['text'], ENT_QUOTES, 'UTF-8');
|
$text = html_entity_decode($unparsed['text'], ENT_QUOTES, 'UTF-8');
|
||||||
|
Reference in New Issue
Block a user