title: Making my search box vulnerable to XSS
body: <p>I been working on this simple search box to search a name in a table, that one I have a success of, now i been looking into a lot of stuff on how to make this search box vulnerable (which is a course requirement that im doing). </p>
  
  <p>Where when I input <code>&lt;script&gt;alert("boom!");&lt;/script&gt;</code> will alert on my page but in my current code it dont really do that which i dont know why as well is it because im using jquery?</p>
  
  <p>I would appreciate if someone would take a look at my code and make this piece vulnerable :)</p>
  
  <p>Here is my code:
  <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>$(document).ready(function(){
  
    $('#search').on('click', function(){
      var term = $('#term').val().toLowerCase();
  
      $.each(list,function(index,value){
        var count = arrayInArray(term,list[index]);
        console.log(count);
        $("tr:eq(" + (count + 1) + ") td").each(function(){
          var tb = [];
          tb.push($(this).text());
          console.log(tb); // data to be printed somewhere
        });
      });
    });
  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="input-group"&gt;
    &lt;input id="term" type="text" class="form-control" placeholder="Search Participant..."&gt;
    &lt;span class="input-group-btn"&gt;
      &lt;button id="search" class="btn btn-default" type="button"&gt;Search&lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>