Fix special characters in board title, board description and thread title (vB)
authorTim Düsterhus <timwolla@bastelstu.be>
Sun, 5 Jan 2014 14:08:46 +0000 (15:08 +0100)
committerTim Düsterhus <timwolla@bastelstu.be>
Sun, 5 Jan 2014 14:30:32 +0000 (15:30 +0100)
files/lib/system/exporter/VB3or4xExporter.class.php

index ca453198db51865109578efaa08731fdeb4ed5c0..e450c7b3b9c74061c9ef9b7b09d92596ec2900bd 100644 (file)
@@ -751,8 +751,8 @@ class VB3or4xExporter extends AbstractExporter {
                                'parentID' => ($board['parentid'] != -1 ? $board['parentid'] : null),
                                'position' => $board['displayorder'],
                                'boardType' => ($board['link'] ? Board::TYPE_LINK : ($board['options'] & self::FORUMOPTIONS_CANCONTAINTHREADS ? Board::TYPE_BOARD : Board::TYPE_CATEGORY)),
-                               'title' => $board['title_clean'],
-                               'description' => $board['description_clean'],
+                               'title' => str_replace('&amp;', '&', $board['title_clean']),
+                               'description' => str_replace('&amp;', '&', $board['description_clean']),
                                'descriptionUseHtml' => 0,
                                'externalURL' => $board['link'],
                                'countUserPosts' => $board['options'] & self::FORUMOPTIONS_COUNTPOSTS ? 1 : 0,
@@ -802,7 +802,7 @@ class VB3or4xExporter extends AbstractExporter {
                while ($row = $statement->fetchArray()) {
                        $data = array(
                                'boardID' => $row['forumid'],
-                               'topic' => $row['title'],
+                               'topic' => StringUtil::decodeHTML($row['title']),
                                'time' => $row['dateline'],
                                'userID' => $row['postuserid'],
                                'username' => $row['postusername'],