aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael <icarus@dabo.de>2012-03-02 10:33:39 +0100
committerMichael <icarus@dabo.de>2012-03-02 10:33:39 +0100
commit52ea842e872cc004fd012496c828e9fb6186bec9 (patch)
treec10e95d5f24bc68565778e314bd4b9108e745e1f
parentb84ef3039c97bf6657c7de5c2977e0aa7e4a7d77 (diff)
downloadvolse-hubzilla-52ea842e872cc004fd012496c828e9fb6186bec9.tar.gz
volse-hubzilla-52ea842e872cc004fd012496c828e9fb6186bec9.tar.bz2
volse-hubzilla-52ea842e872cc004fd012496c828e9fb6186bec9.zip
html2bbcode: don't convert sizes and fonts.
-rwxr-xr-xinclude/html2bbcode.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index 65920380b..442e38691 100755
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -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);
}
@@ -150,10 +150,14 @@ function html2bbcode($message)
node2bbcode($doc, 'font', array('size'=>'/(\d+)/'), '[size=$1]', '[/size]');
node2bbcode($doc, 'font', array('color'=>'/(.+)/'), '[color=$1]', '[/color]');
- node2bbcode($doc, 'span', array('style'=>'/.*color:\s*(.+?)[,;].*/'), '[color="$1"]', '[/color]');
- node2bbcode($doc, 'span', array('style'=>'/.*font-size:\s*(\d+)/'), '[size=$1]', '[/size]');
+ // 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-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]');