aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-27 05:02:40 -0700
committerfriendica <info@friendica.com>2013-08-27 05:02:40 -0700
commitc6e527f6fec7f3a5350f8cf794decfd35cea134a (patch)
tree6bd8295369bdd6887b6cd6a58d112afbd5f1eb92 /include/bbcode.php
parent6a2cb837afc41dfe2e535164edb1865d4b0278a4 (diff)
downloadvolse-hubzilla-c6e527f6fec7f3a5350f8cf794decfd35cea134a.tar.gz
volse-hubzilla-c6e527f6fec7f3a5350f8cf794decfd35cea134a.tar.bz2
volse-hubzilla-c6e527f6fec7f3a5350f8cf794decfd35cea134a.zip
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.
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php1
1 files changed, 1 insertions, 0 deletions
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("&nbsp;&nbsp;&nbsp;&nbsp;","&nbsp;&nbsp;"),$Text);
// Set up the parameters for a URL search string
$URLSearchString = "^\[\]";