|
From: Nathan C. <na...@us...> - 2001-12-06 23:39:19
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv7685/includes
Modified Files:
bbcode.php
Log Message:
fixed [code] bbcode linebreaking nbsp; stuff.
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** bbcode.php 2001/11/26 21:40:22 1.17
--- bbcode.php 2001/12/06 23:39:16 1.18
***************
*** 226,229 ****
--- 226,230 ----
{
// Unique ID for this message..
+
$uid = md5(mt_rand());
$uid = substr($uid, 0, BBCODE_UID_LEN);
***************
*** 537,546 ****
$after_replace = preg_replace($html_entities_match, $html_entities_replace, $after_replace);
-
- // Replace all spaces with non-breaking spaces.
- $after_replace = str_replace(" ", " ", $after_replace);
! // Replace 3 nbsp's with " " so non-tabbed code indents without making huge long lines.
! $after_replace = str_replace(" ", " ", $after_replace);
// Replace tabs with " " so tabbed code indents sorta right without making huge long lines.
--- 538,546 ----
$after_replace = preg_replace($html_entities_match, $html_entities_replace, $after_replace);
! // Replace 2 spaces with " " so non-tabbed code indents without making huge long lines.
! $after_replace = str_replace(" ", " ", $after_replace);
! // now Replace 2 spaces with " " to catch odd #s of spaces.
! $after_replace = str_replace(" ", " ", $after_replace);
// Replace tabs with " " so tabbed code indents sorta right without making huge long lines.
|