From: Marc-Etienne V. <var...@us...> - 2008-01-22 14:24:03
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17455/lib/plugin Modified Files: RichTable.php Log Message: Patch for RichTable.php: enrich syntax for attributes Index: RichTable.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/RichTable.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -2 -b -p -d -r1.7 -r1.8 --- RichTable.php 6 May 2005 17:44:24 -0000 1.7 +++ RichTable.php 22 Jan 2008 14:24:02 -0000 1.8 @@ -136,4 +136,9 @@ extends WikiPlugin function _parse_attr($line) { + // We allow attributes with or without quotes (") + // border=1, cellpadding="5" + // style="font-family: sans-serif; border-top:1px solid #dddddd; + // What will not work is style with comma inside, e. g. + // style="font-family: Verdana, Arial, Helvetica, sans-serif" $attr_chunks = preg_split("/\s*,\s*/", strtolower($line)); $options = array(); @@ -142,5 +147,5 @@ extends WikiPlugin $key_val = preg_split("/\s*=\s*/", $attr_pair); if (!empty($key_val[1])) - $options[trim($key_val[0])] = trim($key_val[1]); + $options[trim($key_val[0])] = trim(str_replace("\"", "", $key_val[1])); } return $options; @@ -149,4 +154,7 @@ extends WikiPlugin // $Log$ +// Revision 1.8 2008/01/22 14:24:02 vargenau +// Patch for RichTable.php: enrich syntax for attributes +// // Revision 1.7 2005/05/06 17:44:24 rurban // silence undefined offset 1 msg |