Changeset 852


Ignore:
Timestamp:
Jan 17, 2016, 10:25:29 PM (9 years ago)
Author:
chronos
Message:
  • Fixed: HTML entities need to be converted before BB code is applied as BB parser itself produce HTML code.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Version.php

    r851 r852  
    66// and system will need database update.
    77
    8 $Revision = 851; // Subversion revision
     8$Revision = 852; // Subversion revision
    99$DatabaseRevision = 849; // Database structure revision
    1010$ReleaseTime = '2016-01-17';
  • trunk/Modules/Forum/Forum.php

    r851 r852  
    5757        '<td><a href="'.$this->System->Link('/forum/?Thread='.$DbRow['Thread']).'">'.HumanDate($DbRow['Date']).'</a></td>'.
    5858        '<td><a href="'.$this->System->Link('/user/?user='.$DbRow['UserId']).'">'.$DbRow['UserName'].'</a></td>'.
    59         '<td>'.htmlspecialchars($Parser->qparse($DbRow['Text'])).'</td>'.
     59        '<td>'.$Parser->qparse(htmlspecialchars($DbRow['Text'])).'</td>'.
    6060        '</tr>';
    6161    }
     
    152152      $Output .= '<div><a href="'.$this->System->Link('/forum/?Thread='.$Line['Thread']).'">'.
    153153      htmlspecialchars($Line['ThreadName']).'</a><br /><strong>'.$Line['UserName'].
    154       '</strong> ('.HumanDate($Line['Date']).'): '.htmlspecialchars($parser->qparse($Line['Text'])).'</div> ';
     154      '</strong> ('.HumanDate($Line['Date']).'): '.$parser->qparse(htmlspecialchars($Line['Text'])).'</div> ';
    155155    $Output .= '</div>'.$PageList['Output'];
    156156    return($Output);
     
    181181
    182182    $parser = new HTML_BBCodeParser2(array('filters' => array('Basic','Extended','Images','Links','Lists','Email')));
    183   //  echo $parser->qparse('[youtube]http://www.youtube.com/watch?v=hwgO6p2Jh-A[/youtube][img]http://www.bbcode.org/images/lubeck_small.jpg[/img]normal [i][b]bold[/b][/i] [img]http://imageshack.com/a/img203/7462/6ctg.jpg[/img]  and normal again');
    184183
    185184    if(array_key_exists('search', $_GET)) $_SESSION['search'] = $_GET['search'];
     
    212211      $Output .= '<div><span style="float:right;">'.$edit.' ('.HumanDate($Line['Date']).
    213212        ')</span><strong>'.$Line['UserName'].'</strong>: '.str_replace("\n", '<br />',
    214         htmlspecialchars($parser->qparse($Line['Text']))).'  </div> ';
     213        $parser->qparse(htmlspecialchars($Line['Text']))).'  </div> ';
    215214    }
    216215    $Output .= '</div>'.$PageList['Output'];
     
    321320        'Title' => htmlspecialchars($DbRow['ThreadText']).' - '.$DbRow['UserName'].': ',
    322321        'Link' => 'http://'.$this->System->Config['Web']['Host'].$this->System->Link('/forum/?Thread='.$DbRow['Thread']),
    323         'Description' => htmlspecialchars($parser->qparse($DbRow['Text'])),
     322        'Description' => $parser->qparse(htmlspecialchars($DbRow['Text'])),
    324323        'Time' => $DbRow['UnixDate'],
    325324      );
  • trunk/Modules/User/Profile.php

    r851 r852  
    132132    while($Line = $DbResult->fetch_assoc())
    133133      $Output .= '<div><a href="'.$this->System->Link('/forum/?Thread='.$Line['Thread']).'">'.htmlspecialchars($Line['ThreadName']).'</a><br />'.
    134         '<strong>'.$Line['UserName'].'</strong> ('.HumanDate($Line['Date']).'): '.htmlspecialchars($parser->qparse($Line['Text'])).'</div> ';
     134        '<strong>'.$Line['UserName'].'</strong> ('.HumanDate($Line['Date']).'): '.$parser->qparse(htmlspecialchars($Line['Text'])).'</div> ';
    135135    $Output .= '</div>';
    136136    return($Output);
Note: See TracChangeset for help on using the changeset viewer.