amp-bind clashes with amp-render and Mustache templates
Description
When I include amp-bind (v0.1) in a page, it breaks the rendering of Mustache templates (v0.2) within amp-render (v1.0).
Specifically, I've found a simple amp-render containing a list is stripped of its opening and closing ul tags.
Reproduction Steps
AMPHTML:
<amp-render src="/path/to/source/" layout="flex-item" credentials="include">
<div placeholder>Hello!</div>
<template type="amp-mustache">
<ul>
<li><a on="tap:searchPanel" class="search-button">Search</a></li>
{{{menu}}}
</ul>
</template>
</amp-render>
JSON:
{"menu":"
<li><a href=\"/account\/\">Account<\/a><\/li>
<li><a href=\"/account\/log-out\/\">Log out<\/a><\/li>"}
Rendered HTML
<amp-render src="/path/to/source/" layout="flex-item" credentials="include" template="user-menu" class="i-amphtml-element i-amphtml-layout-flex-item i-amphtml-layout-size-defined i-amphtml-built i-amphtml-layout" i-amphtml-layout="flex-item" aria-live="polite">
<div placeholder="" class="amp-hidden">Hello!</div>
<template type="amp-mustache" id="user-menu">
<ul>
<li><a on="tap:searchPanel" class="search-button">Search</a></li>
{{{menu}}}
</ul>
</template>
<div i-amphtml-rendered="true" loading="auto" aria-live="polite">
<li><a class="search-button" on="tap:searchPanel">Search</a></li>
<li><a target="_top" href="/account/">Account</a></li>
<li><a target="_top" href="/account/log-out/">Log out</a></li>
</div></amp-render>
Note within the <div i-amphtml-rendered="true" block, there are no <ul>s. If I remove the amp-bind component inclusion, or on any other page, it works perfectly.
@AaronMLB thanks for reporting this issue. I am able to repro this and suspect it's a bug with template rendering. Need to investigate further and will update this issue when I have more.
@AaronMLB thanks for reporting this issue. I am able to repro this and suspect it's a bug with template rendering. Need to investigate further and will update this issue when I have more.
Thanks @dmanek, will await.
@AaronMLB figured out the issue. We were appending the innerHTML which would exclude the wrapper ul element. Fix in progress.