title: Check for a specific string in javascript?
body: <p>I have a custom div that's changed to an input element, this custom div input element has a <code>&lt;p&gt;</code> tag inside with a default placeholder text. I want to check it is not empty like doing it in a required property in a normal input element.</p>
  
  <p>When submitting I want JavaScript to check whether the div element has the default place holder or new text.</p>
  
  <p>I used this code </p>
  
  <pre><code>var data =$('#divtext').html();
  if(data == '&lt;p&gt;Default place holder&lt;/p&gt;')
  {
       console.log('empty');
  }
  else
  {
       console.log('notempty');
  }
  </code></pre>
  
  <p>However no matter how I submit the div with no text I get the 'notempty' response but why? </p>