title: I`ve problem with js inner html,I`m trying to get data adn save it to base, but I don`t know how to fix it
body: <p>'Here is innerHtml in my js code'
  `   template: '&lt;%var items = cart.items();var settings = cart.settings();var hasItems = !!items.length;var priceFormat = { format: true, currency: cart.settings(&quot;currency_code&quot;) };var totalFormat = { format: true, showCode: true };%&gt; sbmincart-empty" action="" target="">    ×    <ul>        &lt;% for (var i= 0, idx = i + 1, len = items.length; i &lt; len; i++, idx++) { %&gt;                                    &lt;a class=&quot;sbmincart-name&quot; href=&quot;&lt;%= items[i].get(&quot;href&quot;) %&gt;&quot;&gt;&lt;%= items[i].get(&quot;w3ls_item&quot;) %&gt;                                    &lt;% if (items[i].get(&quot;item_number&quot;)) { %&gt;                    <li>                        &lt;%= items[i].get(&quot;item_number&quot;) %&gt;                        &lt;input type=&quot;hidden&quot; name=&quot;item_number_&lt;%= idx %&gt;&quot; value=&quot;&lt;%= items[i].get(&quot;item_number&quot;) %&gt;&quot; /&gt;                    </li>                    &lt;% } %&gt;                    &lt;% if (items[i].discount()) { %&gt;                    <li>                        &lt;%= config.strings.discount %&gt; &lt;%= items[i].discount(priceFormat) %&gt;                        " value="" />                    </li>                    &lt;% } %&gt;                    &lt;% for (var options = items[i].options(), j = 0, len2 = options.length; j &lt; len2; j++) { %&gt;                        <li>                            &lt;%= options[j].key %&gt;: &lt;%= options[j].value %&gt;                            _" value="" />                            _" value="" />                        </li>                    &lt;% } %&gt;                </ul>                                        &lt;input class=&quot;sbmincart-quantity&quot; data-sbmincart-idx=&quot;&lt;%= i %&gt;&quot; name=&quot;quantity_&lt;%= idx %&gt;&quot; type=&quot;text&quot; pattern=&quot;[0-9]*&quot; value=&quot;&lt;%= items[i].get(&quot;quantity&quot;) %&gt;&quot; autocomplete=&quot;off&quot; /&gt;                                        ">×                                        &lt;%= items[i].total(priceFormat) %&gt;                 &lt;input type=&quot;hidden&quot; name=&quot;w3ls_item_&lt;%= idx %&gt;&quot; value=&quot;&lt;%= items[i].get(&quot;w3ls_item&quot;) %&gt;&quot; /&gt;    " value="" />            &lt;input type=&quot;hidden&quot; name=&quot;shipping_&lt;%= idx %&gt;&quot; value=&quot;&lt;%= items[i].get(&quot;shipping&quot;) %&gt;&quot; /&gt;            &lt;input type=&quot;hidden&quot; name=&quot;shipping2_&lt;%= idx %&gt;&quot; value=&quot;&lt;%= items[i].get(&quot;shipping2&quot;) %&gt;&quot; /&gt;        </li>        &lt;% } %&gt;                &lt;% if (hasItems) { %&gt;                        &lt;%= config.strings.subtotal %&gt;  &lt;%= cart.total(totalFormat) %&gt;                        ">    &lt;%- config.strings.button %&gt;        &lt;% }  else { %&gt;            &lt;%= config.strings.empty %&gt;</p>        &lt;% } %&gt;                &lt;% for (var key in settings) { %&gt;        " value="" />    &lt;% } %&gt;',</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    template: '&lt;%var items = cart.items();var settings = cart.settings();var hasItems = !!items.length;var priceFormat = { format: true, currency: cart.settings("currency_code") };var totalFormat = { format: true, showCode: true };%&gt; &lt;form method="post" class="&lt;% if (!hasItems) { %&gt;sbmincart-empty&lt;% } %&gt;" action="&lt;%= config.action %&gt;" target="&lt;%= config.target %&gt;"&gt;    &lt;button type="button" class="sbmincart-closer"&gt;&amp;times;&lt;/button&gt;    &lt;ul&gt;        &lt;% for (var i= 0, idx = i + 1, len = items.length; i &lt; len; i++, idx++) { %&gt;        &lt;li class="sbmincart-item"&gt;            &lt;div class="sbmincart-details-name"&gt;                &lt;a class="sbmincart-name" href="&lt;%= items[i].get("href") %&gt;"&gt;&lt;%= items[i].get("w3ls_item") %&gt;&lt;/a&gt;                &lt;ul class="sbmincart-attributes"&gt;                    &lt;% if (items[i].get("item_number")) { %&gt;                    &lt;li&gt;                        &lt;%= items[i].get("item_number") %&gt;                        &lt;input type="hidden" name="item_number_&lt;%= idx %&gt;" value="&lt;%= items[i].get("item_number") %&gt;" /&gt;                    &lt;/li&gt;                    &lt;% } %&gt;                    &lt;% if (items[i].discount()) { %&gt;                    &lt;li&gt;                        &lt;%= config.strings.discount %&gt; &lt;%= items[i].discount(priceFormat) %&gt;                        &lt;input type="hidden" name="discount_amount_&lt;%= idx %&gt;" value="&lt;%= items[i].discount() %&gt;" /&gt;                    &lt;/li&gt;                    &lt;% } %&gt;                    &lt;% for (var options = items[i].options(), j = 0, len2 = options.length; j &lt; len2; j++) { %&gt;                        &lt;li&gt;                            &lt;%= options[j].key %&gt;: &lt;%= options[j].value %&gt;                            &lt;input type="hidden" name="on&lt;%= j %&gt;_&lt;%= idx %&gt;" value="&lt;%= options[j].key %&gt;" /&gt;                            &lt;input type="hidden" name="os&lt;%= j %&gt;_&lt;%= idx %&gt;" value="&lt;%= options[j].value %&gt;" /&gt;                        &lt;/li&gt;                    &lt;% } %&gt;                &lt;/ul&gt;            &lt;/div&gt;            &lt;div class="sbmincart-details-quantity"&gt;                &lt;input class="sbmincart-quantity" data-sbmincart-idx="&lt;%= i %&gt;" name="quantity_&lt;%= idx %&gt;" type="text" pattern="[0-9]*" value="&lt;%= items[i].get("quantity") %&gt;" autocomplete="off" /&gt;            &lt;/div&gt;            &lt;div class="sbmincart-details-remove"&gt;                &lt;button type="button" class="sbmincart-remove" data-sbmincart-idx="&lt;%= i %&gt;"&gt;&amp;times;&lt;/button&gt;            &lt;/div&gt;            &lt;div class="sbmincart-details-price"&gt;                &lt;span class="sbmincart-price"&gt;&lt;%= items[i].total(priceFormat) %&gt;&lt;/span&gt;            &lt;/div&gt;     &lt;input type="hidden" name="w3ls_item_&lt;%= idx %&gt;" value="&lt;%= items[i].get("w3ls_item") %&gt;" /&gt;    &lt;input type="hidden" name="amount_&lt;%= idx %&gt;" value="&lt;%= items[i].amount() %&gt;" /&gt;            &lt;input type="hidden" name="shipping_&lt;%= idx %&gt;" value="&lt;%= items[i].get("shipping") %&gt;" /&gt;            &lt;input type="hidden" name="shipping2_&lt;%= idx %&gt;" value="&lt;%= items[i].get("shipping2") %&gt;" /&gt;        &lt;/li&gt;        &lt;% } %&gt;    &lt;/ul&gt;    &lt;div class="sbmincart-footer"&gt;        &lt;% if (hasItems) { %&gt;    &lt;form action="" method="post" &gt;    &lt;div class="sbmincart-subtotal"&gt;                &lt;%= config.strings.subtotal %&gt; &lt;input  type="hidden" name="umumiy_foyda"&gt; &lt;%= cart.total(totalFormat) %&gt;            &lt;/div&gt;       &lt;/form&gt;     &lt;button class="sbmincart-submit" type="submit" data-sbmincart-alt="&lt;%= config.strings.buttonAlt %&gt;"&gt;    &lt;%- config.strings.button %&gt;&lt;/button&gt;        &lt;% }  else { %&gt;            &lt;p class="sbmincart-empty-text"&gt;&lt;%= config.strings.empty %&gt;&lt;/p&gt;        &lt;% } %&gt;    &lt;/div&gt;    &lt;input type="hidden" name="cmd" value="_cart" /&gt;    &lt;input type="hidden" name="upload" value="1" /&gt;    &lt;% for (var key in settings) { %&gt;        &lt;input type="hidden" name="&lt;%= key %&gt;" value="&lt;%= settings[key] %&gt;" /&gt;    &lt;% } %&gt;&lt;/form&gt;',</code></pre>
  </div>
  </div>
  '</p>