title: How to put a <script> inside a <script>?
body: <p>JS noob here.
  I'm not sure if this if I'm doing this correctly but I'm trying to run a script &quot;within&quot; another script.</p>
  <pre><code>&lt;script type=&quot;text/discourse-plugin&quot; version=&quot;0.8&quot;&gt;
      api.decorateWidget('post:after', helper =&gt; {
          let post = helper.getModel();
          if (post.get('post_number') % 3 === 0) { // after every 3 posts
              return helper.rawHtml(`
  &lt;div class=&quot;lead_static_wrapper&quot;&gt;&lt;p&gt;Label&lt;/p&gt;
  &lt;div class=&quot;proper-ad-unit&quot;&gt;
  &lt;div id=&quot;pr-ad-nr_main_1&quot;&gt;
  
  
  propertag.cmd.push(function() { proper_display('nr_main_1'); });
  
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
              `);
          }
      });
  &lt;/script&gt;
  </code></pre>
  <p>I need this part to run but it just shows as text when live, and doesn't seem to be running.</p>
  <pre><code>propertag.cmd.push(function() { proper_display('nr_main_1'); });
  </code></pre>
  <p>This doesn't seem to be the working:</p>
  <pre><code>&lt;script type=&quot;text/discourse-plugin&quot; version=&quot;0.8&quot;&gt;
      api.decorateWidget('post:after', helper =&gt; {
          let post = helper.getModel();
          if (post.get('post_number') % 3 === 0) { // after every 3 posts
              return helper.rawHtml(`
  &lt;div class=&quot;lead_static_wrapper&quot;&gt;&lt;p&gt;Label&lt;/p&gt;
  &lt;div class=&quot;proper-ad-unit&quot;&gt;
  &lt;div id=&quot;pr-ad-nr_main_1&quot;&gt;
  
  
  &lt;script&gt;propertag.cmd.push(function() { proper_display('nr_main_1'); });&lt;/script&gt;
  
  
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
              `);
          }
      });
  &lt;/script&gt;
  </code></pre>
  <p>Is there a way to edit the JS structure so this works?
  I'm trying to make this work for Discourse forums. Any help is appreciated! Thanks!</p>