Javascript I';我使用了一个带有#eachIndex的(拆分)把手,但是我的HTML显示为纯文本?
我在BigCommerce中使用此字符串将描述拆分为选项卡:Javascript I';我使用了一个带有#eachIndex的(拆分)把手,但是我的HTML显示为纯文本?,javascript,html,jquery,Javascript,Html,Jquery,我在BigCommerce中使用此字符串将描述拆分为选项卡: {{#eachIndex (split product.description '<!-- split -->')}} {{#if index '==' '1' }} {{item}} {{/if}} {{/eachIndex}} {{{#eachIndex(split product.description'')} {{#如果索引'=''1'} {{item}} {{/if} {{/eachIndex}
{{#eachIndex (split product.description '<!-- split -->')}}
{{#if index '==' '1' }}
{{item}}
{{/if}}
{{/eachIndex}}
{{{#eachIndex(split product.description'')}
{{#如果索引'=''1'}
{{item}}
{{/if}
{{/eachIndex}
但是我的内容
<div class="row">
<div class="col-sm-8">
<h5>Key Benefits</h5>
<ul><li>Effective on all hair types including oily, dry, curly, flat and textured</li>
<li>Safe for color-treated, keratin-treated and bleached hair</li>
<li>Won’t strip the natural oils of your hair and scalp</li>
<li>Nourishes and soothes dry, flaky scalps, including dandruff</li>
<li>Adds volume and won’t weigh down hair</li>
<li>Plastic-free packaging</li>
<li>Great for travel: compact, light-weight, long-lasting, leak-proof, and TSA-Friendly</li>
<li>Fits in the palm of your hand</li>
<li>Handmade in the USA</li>
<li>Vegan</li>
<li>Optional storage case sold separately</li></ul>
<h5>Soap Squad Tips</h5>
<ul>
<li>May help to reduce the brassy appearance with silver, white or
highlighted hair</li>
<li>Store your hair bar just like soap - on a ledge or soap rest where it
can drain and air dry between uses</li></ul>
<h5>No “Badditives” (None of the Nasty Stuff)</h5>
<ul><li>Paraben Free</li>
<li>Alcohol Free</li>
<li>Synthetic Fragrance Free</li>
<li>Lauryl and Laureth Sulfate Free</li>
<li>Phthalate Free</li></ul>
</div>
<div class="col-sm-4">
<img src="https://cdn11.bigcommerce.com/s-rs60yvvnlk/product_images/uploaded_images/boyfriend-hair-bars-600x860.jpg">
</div>
</div>
主要好处
- 适用于所有头发类型,包括油性、干性、卷曲、扁平和纹理
- 对经过颜色处理、角蛋白处理和漂白的头发安全
- 不会剥去头发和头皮上的天然油脂
- 滋养和舒缓干燥、片状头皮,包括头皮屑
- 增加体积,不会使头发变薄
- 无塑料包装
- 非常适合旅行:小巧、重量轻、经久耐用、防泄漏、对TSA友好
- 适合你的手掌
- 美国手工制作
- 素食主义者
- 可选存储箱单独出售
肥皂小贴士
- 可能有助于减少银、白色或白色的铜色外观
突出显示的头发
- 把你的发条像肥皂一样放在窗台上或肥皂架上
可在两次使用之间排水并风干
没有“坏蛋”(没有肮脏的东西)
不含尼泊金酯
不含酒精
无合成香料
不含十二烷基和月桂酸酯硫酸盐
不含邻苯二甲酸盐
以纯文本显示,如上所示。当我使用常规的{{{first(split product.description'')}}}或last时,HTML显示良好。但似乎只有在我使用eachIndex的时候。我这样做是因为我需要(3)个分开的分割,而第一个和最后一个分割似乎只能给我两个
#eachIndex为什么要将我的描述转换为纯文本并禁用HTML