aboutsummaryrefslogtreecommitdiffstats
path: root/include/html2bbcode.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-16 08:33:01 +0100
committerzottel <github@zottel.net>2012-03-16 08:33:01 +0100
commitea4c806c5c3adacb6ef585de657e5f34c2e24c98 (patch)
tree1e3314f76eefd8f7d014ae8e4a218dc9663ae3d7 /include/html2bbcode.php
parent69f4448adaf7afddf00deeb2f832938d5505abcf (diff)
parent47e1b8d0c07d79c33f8b2de52145aa751d4b955a (diff)
downloadvolse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.tar.gz
volse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.tar.bz2
volse-hubzilla-ea4c806c5c3adacb6ef585de657e5f34c2e24c98.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/html2bbcode.php')
-rwxr-xr-xinclude/html2bbcode.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index 32a90d7d6..69ccf41b7 100755
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -142,18 +142,22 @@ function html2bbcode($message)
node2bbcode($doc, 'span', array('style'=>'font-style: italic;'), '[i]', '[/i]');
node2bbcode($doc, 'span', array('style'=>'font-weight: bold;'), '[b]', '[/b]');
- node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]');
+ /*node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[font=$1][size=$2][color=$3]', '[/color][/size][/font]');
node2bbcode($doc, 'font', array('size'=>'/(\d+)/', 'color'=>'/(.+)/'), '[size=$1][color=$2]', '[/color][/size]');
node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'size'=>'/(.+)/'), '[font=$1][size=$2]', '[/size][/font]');
node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/', 'color'=>'/(.+)/'), '[font=$1][color=$3]', '[/color][/font]');
node2bbcode($doc, 'font', array('face'=>'/([\w ]+)/'), '[font=$1]', '[/font]');
node2bbcode($doc, 'font', array('size'=>'/(\d+)/'), '[size=$1]', '[/size]');
node2bbcode($doc, 'font', array('color'=>'/(.+)/'), '[color=$1]', '[/color]');
+*/
+ // Untested
+ //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*font-family:\s*(.+?)[,;].*color:\s*(.+?)[,;].*/'), '[size=$1][font=$2][color=$3]', '[/color][/font][/size]');
+ //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)[,;].*/'), '[size=$1]', '[/size]');
+ //node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(.+?)[,;].*/'), '[size=$1]', '[/size]');
node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]');
- node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)/'), '[size=$1]', '[/size]');
-
//node2bbcode($doc, 'span', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]');
+
//node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)pt.*/'), '[font=$1][size=$2]', '[/size][/font]');
//node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*font-size:\s*(\d+?)px.*/'), '[font=$1][size=$2]', '[/size][/font]');
//node2bbcode($doc, 'div', array('style'=>'/.*font-family:\s*(.+?)[,;].*/'), '[font=$1]', '[/font]');
@@ -187,13 +191,13 @@ function html2bbcode($message)
node2bbcode($doc, 'hr', array(), "[hr]", "");
- //node2bbcode($doc, 'table', array(), "", "");
- //node2bbcode($doc, 'tr', array(), "\n", "");
- //node2bbcode($doc, 'td', array(), "\t", "");
- node2bbcode($doc, 'table', array(), "[table]", "[/table]");
- node2bbcode($doc, 'th', array(), "[th]", "[/th]");
- node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]");
- node2bbcode($doc, 'td', array(), "[td]", "[/td]");
+ node2bbcode($doc, 'table', array(), "", "");
+ node2bbcode($doc, 'tr', array(), "\n", "");
+ node2bbcode($doc, 'td', array(), "\t", "");
+ //node2bbcode($doc, 'table', array(), "[table]", "[/table]");
+ //node2bbcode($doc, 'th', array(), "[th]", "[/th]");
+ //node2bbcode($doc, 'tr', array(), "[tr]", "[/tr]");
+ //node2bbcode($doc, 'td', array(), "[td]", "[/td]");
node2bbcode($doc, 'h1', array(), "\n\n[size=xx-large][b]", "[/b][/size]\n");
node2bbcode($doc, 'h2', array(), "\n\n[size=x-large][b]", "[/b][/size]\n");