|
From: Jonathan H. <the...@us...> - 2002-01-24 15:32:10
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv24346
Modified Files:
admin_smilies.php
Log Message:
Fix for bug #505883
Index: admin_smilies.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_smilies.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** admin_smilies.php 2002/01/24 02:51:00 1.18
--- admin_smilies.php 2002/01/24 15:32:06 1.19
***************
*** 145,148 ****
--- 145,153 ----
for( $j = 2; $j < count($smile_data); $j++)
{
+ //
+ // Replace > and < with the proper html_entities for matching.
+ //
+ $smile_data[$j] = str_replace("<", "<", $smile_data[$j]);
+ $smile_data[$j] = str_replace(">", ">", $smile_data[$j]);
$k = $smile_data[$j];
***************
*** 397,400 ****
--- 402,410 ----
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);
+ //
+ // Convert < and > to proper htmlentities for parsing.
+ //
+ $smile_code = str_replace('<', '<', $smile_code);
+ $smile_code = str_replace('>', '>', $smile_code);
//
***************
*** 429,432 ****
--- 439,448 ----
//
+ // Convert < and > to proper htmlentities for parsing.
+ //
+ $smile_code = str_replace('<', '<', $smile_code);
+ $smile_code = str_replace('>', '>', $smile_code);
+
+ //
// Save the data to the smiley table.
//
***************
*** 488,491 ****
--- 504,513 ----
for($i = 0; $i < count($smilies); $i++)
{
+ //
+ // Replace htmlentites for < and > with actual character.
+ //
+ $smilies[$i]['code'] = str_replace('<', '<', $smilies[$i]['code']);
+ $smilies[$i]['code'] = str_replace('>', '>', $smilies[$i]['code']);
+
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
***************
*** 494,498 ****
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
!
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'],
"CODE" => $smilies[$i]['code'],
--- 516,520 ----
"ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
!
"SMILEY_IMG" => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'],
"CODE" => $smilies[$i]['code'],
***************
*** 515,517 ****
include('page_footer_admin.'.$phpEx);
! ?>
\ No newline at end of file
--- 537,539 ----
include('page_footer_admin.'.$phpEx);
! ?>
|