diff options
author | JoshyPHP <s9e.dev@gmail.com> | 2015-05-29 23:38:01 +0200 |
---|---|---|
committer | JoshyPHP <s9e.dev@gmail.com> | 2015-05-30 17:29:49 +0200 |
commit | 2a7d26d3debdce7ca82f3044de45b651286c6034 (patch) | |
tree | 359aea1fc981d422ece9e7f817fea0286d45820a /phpBB | |
parent | 25ce302a605952e0a38605c6255c5ad212c2b4c6 (diff) | |
download | forums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar forums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar.gz forums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar.bz2 forums-2a7d26d3debdce7ca82f3044de45b651286c6034.tar.xz forums-2a7d26d3debdce7ca82f3044de45b651286c6034.zip |
[ticket/13803] Use accurate flags for generate_text_for_edit()
PHPBB3-13803
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/textreparser/base.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/phpbb/textreparser/base.php b/phpBB/phpbb/textreparser/base.php index 4afcecff6a..87a4268d0d 100644 --- a/phpBB/phpbb/textreparser/base.php +++ b/phpBB/phpbb/textreparser/base.php @@ -175,14 +175,14 @@ abstract class base implements reparser_interface protected function reparse_record(array $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( $record, - generate_text_for_edit( - $record['text'], - $record['bbcode_uid'], - OPTION_FLAG_BBCODE | OPTION_FLAG_SMILIES | OPTION_FLAG_LINKS - ) + generate_text_for_edit($record['text'], $record['bbcode_uid'], $flags) ); + // 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 $text = html_entity_decode($unparsed['text'], ENT_QUOTES, 'UTF-8'); |