Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How to make a HTML table in comment section

aeryaery Gtricks Forum in 2.2 :) ✭✭✭
edited May 2011 in Vanilla 2.0 - 2.8
When normal html table is written, it is not shown in comment section. How do I write html in comment body?

There was an error rendering this rich post.

Comments

  • Options
    If you have markdown [extra] enabled for formatting, like this:

    First Header | Second Header
    ------------- | -------------
    Content Cell | Content Cell
    Content Cell | Content Cell
  • Options
    yu_tangyu_tang New
    edited May 2011
    /plugins/HtmLawed/htmLawed/htmLawed.php

    Replace:
    function hl_bal($t, $do=1, $in='div'){
    with:
    function hl_bal($t, $do=1, $in='div'){
    // <br /> tag breaks table, so we strip them.
    $t = preg_replace(array('#(</?(?:td|tr)>)<br />#', '#<br />(\s*</td>)#'), '\\1', $t);
    vf.org is working with table tag properly, so maybe core devs are knowing better way.
  • Options
    Ok, here is a demonstration.

    [Source]
    <table class="PreferenceGroup">
      <thead>
        <tr>
          <td>Plugin</td>
          <td>Version</td>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Addon Manager</td>
          <td>0.2.0</td>
        </tr><tr>
          <td>CLEditor jQuery WYSIWYG</td>
          <td>0.5</td>
        </tr><tr>
          <td>Emotify :)</td>
          <td>1.0</td>
        </tr><tr>
          <td>Facebook</td>
          <td>0.1a</td>
        </tr><tr>
          <td>Q&A</td>
          <td>1.0.3b</td>
        </tr>
      </tbody>
    </table>
    [Result]
    Plugin Version
    Addon Manager 0.2.0
    CLEditor jQuery WYSIWYG 0.5
    Emotify :) 1.0
    Facebook 0.1a
    Q&A 1.0.3b
    [Source]
    <table class="PreferenceGroup"><thead><tr><td>Plugin</td><td>Version</td></tr></thead><tbody><tr><td>Addon Manager</td><td>0.2.0</td></tr><tr><td>CLEditor jQuery WYSIWYG</td><td>0.5</td></tr><tr><td>Emotify :)</td><td>1.0</td></tr><tr><td>Facebook</td><td>0.1a</td></tr><tr><td>Q&A</td><td>1.0.3b</td></tr></tbody></table>
    [Result]
    PluginVersion
    Addon Manager0.2.0
    CLEditor jQuery WYSIWYG0.5
    Emotify :)1.0
    Facebook0.1a
    Q&A1.0.3b
    [Conclusion]
    Do not break the line inside table.
  • Options
    Thank you for this - I've been puzzling over how to do this for hours!
  • Options
    aeryaery Gtricks Forum in 2.2 :) ✭✭✭
    @yu_tang thanks. Let me try.

    There was an error rendering this rich post.

Sign In or Register to comment.