]> git.mxchange.org Git - friendica.git/blobdiff - include/html2bbcode.php
use fancybox instead of lightbox
[friendica.git] / include / html2bbcode.php
index 4297ff2f9d18812972281d5598c310cb9fc64c5f..32a90d7d631cfcaee36fcdddb5b33990036830a8 100755 (executable)
@@ -10,7 +10,7 @@ Originally made for the syncom project: http://wiki.piratenpartei.de/Syncom
 function node2bbcode(&$doc, $oldnode, $attributes, $startbb, $endbb)
 {
        do {
-               $done = node2bbcodesub(&$doc, $oldnode, $attributes, $startbb, $endbb);
+               $done = node2bbcodesub($doc, $oldnode, $attributes, $startbb, $endbb);
        } while ($done);
 }
 
@@ -204,7 +204,7 @@ function html2bbcode($message)
 
        node2bbcode($doc, 'a', array('href'=>'/(.+)/'), '[url=$1]', '[/url]');
 
-       node2bbcode($doc, 'img', array('src'=>'/(.+)/', 'width'=>'/(\d+)/', 'height'=>'/(\d+)/'), '[img$2x$3]$1', '[/img]');
+       node2bbcode($doc, 'img', array('src'=>'/(.+)/', 'width'=>'/(\d+)/', 'height'=>'/(\d+)/'), '[img=$2x$3]$1', '[/img]');
        node2bbcode($doc, 'img', array('src'=>'/(.+)/'), '[img]$1', '[/img]');
 
 
@@ -212,7 +212,7 @@ function html2bbcode($message)
        node2bbcode($doc, 'audio', array('src'=>'/(.+)/'), '[audio]$1', '[/audio]');
        node2bbcode($doc, 'iframe', array('src'=>'/(.+)/'), '[iframe]$1', '[/iframe]');
 
-       node2bbcode($doc, 'code', array(), '[code]$1', '[/code]');
+       node2bbcode($doc, 'code', array(), '[code]', '[/code]');
 
        $message = $doc->saveHTML();
 
@@ -258,7 +258,7 @@ function html2bbcode($message)
                                        "[hr]\n",
                                        "\n[list",
                                        "[/list]\n",
-                                       "\n[/list]",
+                                       "\n[/",
                                        "[list]\n",
                                        "[list=1]\n",
                                        "\n[*]"),
@@ -268,7 +268,7 @@ function html2bbcode($message)
                                        "[hr]",
                                        "[list",
                                        "[/list]",
-                                       "[/list]",
+                                       "[/",
                                        "[list]",
                                        "[list=1]",
                                        "[*]"),