From c6e527f6fec7f3a5350f8cf794decfd35cea134a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 27 Aug 2013 05:02:40 -0700 Subject: when using the bbcode mimetype a space is just a space. A return is a return. But as opposed to HTML, two spaces are now non-breaking. A tab (assuming you can figure out how to enter one in a text field) is now four non-breaking spaces. This should let us insert code snippets with much more readable indentation. --- include/bbcode.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include/bbcode.php') diff --git a/include/bbcode.php b/include/bbcode.php index a0a53a310..4647b8567 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -259,6 +259,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { $Text = str_replace(array("\n","\r"), array('',''),$Text); + $Text = str_replace(array("\t"," "),array("    ","  "),$Text); // Set up the parameters for a URL search string $URLSearchString = "^\[\]"; -- cgit v1.2.3