NodeBB Template results in something completely wrong

Bug Reports
  • Hi, I'm working on a theme extending Vanilla. See

    I've got a problem where NodeBB generates something completely wrong on my hompage. Here's the associated template part:

              <div class="content-container">
                <img src="\{categories.children.posts.user.picture\}" class="pull-left img-circle" />
                <a href="{relative_path}/topic/\{categories.children.posts.topic.slug\}<!-- IF categories.children.posts.index -->/\{categories.children.posts.index}<!-- ENDIF categories.children.posts.index -->">
                    <div class="content">\{categories.children.posts.content\}</div>
                    <div class="home-fade"></div>

    As you can see there's a div inside a a here.
    Now the result:

    <div class="content-container">
      <img src=";default=retro&amp;rating=pg" class="pull-left img-circle">
      <a href="/topic/5/téléchargements/2">
        </a><div><a href="/topic/5/téléchargements/2">
          </a><div class="content"><!-- SNIP --></div>
          <div class="home-fade"></div>

    A complete mess. The a is closed before the the div it's supposed to contain starts, it inserted another a in this div (wtf?) and multiple other ones in the content.
    You can see how wrong it looks on my mainpage, second post of first category in second section.
    Here's a screenshot:

    My question is, wtf is NodeBB doing here? How can I fix this?

    EDIT: Added some \ in the code snippets to prevent NodeBB from removing things in braces

  • Opened issue
    This is very strange and should be fixed. If it comes from me doing something invalid, it should output some error or warning somewhere. Something has to be done, whatever the cause of this is.

  • What version of t.js is installed?

Suggested Topics