Imagine this construct:
{{{
#!SQLTable
SELECT DISTINCT
( SELECT value FROM session_attribute WHERE name='pagemoderator' AND Sid=m.Sid ) AS "Standard",
"[[Image(" || REPLACE(
REPLACE(
( SELECT value FROM session_attribute WHERE name='picture_href' AND Sid=m.Sid ), '/myproject/raw-attachment/wiki/', '' ), '/', ':')
|| ", center, 50px)]][[BR]]" || ( SELECT value FROM session_attribute WHERE name='name' AND Sid=m.Sid ) AS "Moderator",
( SELECT value FROM session_attribute WHERE name='email' AND Sid=m.Sid ) AS "Email"
FROM
session_attribute m
WHERE
name='pagemoderator' AND NOT value=''
ORDER BY
Standard
}}}
The following patch let the table appear with all bells and whistles:
Index: wikitablemacro/trunk/wikitable/table.py
===================================================================
--- wikitablemacro/trunk/wikitable/table.py (revision 12458)
+++ wikitablemacro/trunk/wikitable/table.py (working copy)
@@ -14,6 +14,7 @@
from trac.core import implements
from trac.web.chrome import ITemplateProvider, add_stylesheet
from trac.wiki.formatter import system_message
+from trac.wiki import wiki_to_html
from trac.wiki.macros import WikiMacroBase
from trac.util.html import Markup
from trac.util.text import exception_to_unicode
@@ -64,7 +65,8 @@
css_class = (idx % 2 == 0) and 'odd' or 'even'
print >> out, " <tr class='%s'>" % css_class
for col in row:
- print >> out, "<td>%s</td>" % col
+ text = wiki_to_html(StringIO(col).getvalue(), self.env, req)
+ print >> out, "<td>%s</td>" % text
print >> out, " </tr>"
print >> out, " </tbody>"