aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorroot <root@bawker.net>2014-05-10 10:55:50 -0700
committerroot <root@bawker.net>2014-05-10 10:55:50 -0700
commit80796c78f5326c670893476fe8e9024c30ebffcc (patch)
tree9be350288804ab8fa46e2ce10043c91e5c97672f /include/bbcode.php
parent711719ce0ce340fbcda7559bf20582e85e4b1e3d (diff)
parent481b4c21c9ab6e7e6df8f65ef97135fb5807d7fd (diff)
downloadvolse-hubzilla-80796c78f5326c670893476fe8e9024c30ebffcc.tar.gz
volse-hubzilla-80796c78f5326c670893476fe8e9024c30ebffcc.tar.bz2
volse-hubzilla-80796c78f5326c670893476fe8e9024c30ebffcc.zip
Merge branch 'master' of https://github.com/chriswinstead/red
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 92d979638..d89ae8485 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -507,6 +507,30 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$Text = preg_replace("(\[size=(\d*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1px;\">$2</span>",$Text);
$Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])ism","<span style=\"font-size: $1;\">$2</span>",$Text);
}
+ // Check for h1
+ if (strpos($Text,'[h1]') !== false) {
+ $Text = preg_replace("(\[h1\](.*?)\[\/h1\])ism",'<h1>$1</h1>',$Text);
+ }
+ // Check for h2
+ if (strpos($Text,'[h2]') !== false) {
+ $Text = preg_replace("(\[h2\](.*?)\[\/h2\])ism",'<h2>$1</h2>',$Text);
+ }
+ // Check for h3
+ if (strpos($Text,'[h3]') !== false) {
+ $Text = preg_replace("(\[h3\](.*?)\[\/h3\])ism",'<h3>$1</h3>',$Text);
+ }
+ // Check for h4
+ if (strpos($Text,'[h4]') !== false) {
+ $Text = preg_replace("(\[h4\](.*?)\[\/h4\])ism",'<h4>$1</h4>',$Text);
+ }
+ // Check for h5
+ if (strpos($Text,'[h5]') !== false) {
+ $Text = preg_replace("(\[h5\](.*?)\[\/h5\])ism",'<h5>$1</h5>',$Text);
+ }
+ // Check for h6
+ if (strpos($Text,'[h6]') !== false) {
+ $Text = preg_replace("(\[h6\](.*?)\[\/h6\])ism",'<h6>$1</h6>',$Text);
+ }
// Check for centered text
if (strpos($Text,'[/center]') !== false) {
$Text = preg_replace("(\[center\](.*?)\[\/center\])ism","<div style=\"text-align:center;\">$1</div>",$Text);