|
From: Paul S. O. <ps...@us...> - 2001-11-26 14:02:56
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv20548
Modified Files:
posting.php
Log Message:
Fixes various issues inc. bugs #485538, #485323 and an incorrect conversion of some accented chars (thanks Ashe for noting it)
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -r1.111 -r1.112
*** posting.php 2001/11/26 01:37:25 1.111
--- posting.php 2001/11/26 14:02:52 1.112
***************
*** 39,46 ****
static $sgml_match = array(" ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ");
! static $sgml_replace = array(" ", "s", "a", "a", "a", "a", "a", "a", "a", "c", "e", "e", "e", "e", "i", "i", "i", "i", "o", "n", "i", "i", "i", "i", "i", "i", "u", "u", "u", "u", "y", "t", "y");
static $accent_match = array("ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ");
! static $accent_replace = array("s", "a", "a", "a", "a", "a", "a", "a", "c", "e", "e", "e", "e", "i", "i", "i", "i", "o", "n", "i", "i", "i", "i", "i", "i", "u", "u", "u", "u", "y", "t", "y");
$entry = " " . stripslashes(strip_tags(strtolower($entry))) . " ";
--- 39,46 ----
static $sgml_match = array(" ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ");
! static $sgml_replace = array(" ", "s", "a", "a", "a", "a", "a", "a", "a", "c", "e", "e", "e", "e", "i", "i", "i", "i", "o", "n", "o", "o", "o", "o", "o", "o", "u", "u", "u", "u", "y", "t", "y");
static $accent_match = array("ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ");
! static $accent_replace = array("s", "a", "a", "a", "a", "a", "a", "a", "c", "e", "e", "e", "e", "i", "i", "i", "i", "o", "n", "o", "o", "o", "o", "o", "o", "u", "u", "u", "u", "y", "t", "y");
$entry = " " . stripslashes(strip_tags(strtolower($entry))) . " ";
***************
*** 580,585 ****
// etc.
//
! $html_entities_match = array("#<#", "#>#", "#& #", "#\"#");
! $html_entities_replace = array("<", ">", "& ", """);
$submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0;
--- 580,585 ----
// etc.
//
! $html_entities_match = array("#&#", "#<#", "#>#", "#\"#");
! $html_entities_replace = array("&", "<", ">", """);
$submit = ( isset($HTTP_POST_VARS['submit']) ) ? TRUE : 0;
***************
*** 2161,2165 ****
$post_username = ( isset($HTTP_POST_VARS['username']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['username']))) : "";
$post_subject = ( isset($HTTP_POST_VARS['subject']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['subject']))) : "";
! $post_message = ( isset($HTTP_POST_VARS['message']) ) ? trim(stripslashes($HTTP_POST_VARS['message'])) : "";
$post_message = preg_replace('#<textarea>#si', '<textarea>', $post_message);
--- 2161,2165 ----
$post_username = ( isset($HTTP_POST_VARS['username']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['username']))) : "";
$post_subject = ( isset($HTTP_POST_VARS['subject']) ) ? trim(strip_tags(stripslashes($HTTP_POST_VARS['subject']))) : "";
! $post_message = ( isset($HTTP_POST_VARS['message']) ) ? trim($HTTP_POST_VARS['message']) : "";
$post_message = preg_replace('#<textarea>#si', '<textarea>', $post_message);
***************
*** 2355,2359 ****
$post_message = preg_replace("/\:(([a-z0-9]:)?)$post_bbcode_uid/si", "", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
! $post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
$post_message = preg_replace('#</textarea>#si', '</textarea>', $post_message);
--- 2355,2359 ----
$post_message = preg_replace("/\:(([a-z0-9]:)?)$post_bbcode_uid/si", "", $post_message);
$post_message = str_replace("<br />", "\n", $post_message);
! // $post_message = preg_replace($html_entities_match, $html_entities_replace, $post_message);
$post_message = preg_replace('#</textarea>#si', '</textarea>', $post_message);
***************
*** 2481,2484 ****
--- 2481,2485 ----
$result = obtain_word_list($orig_word, $replacement_word);
+
if( $bbcode_on )
{
***************
*** 2487,2491 ****
$preview_subject = $post_subject;
! $preview_message = prepare_message($post_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
//
--- 2488,2493 ----
$preview_subject = $post_subject;
! $preview_message = stripslashes(prepare_message($post_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid));
! $post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
//
|