title: Python - sanitizing href by character parsing
body: <p>What I know:
  A malicious user could do naughty things inside an href tag if he did something like:</p>
  
  <pre><code>&lt;a href "www.somesite.com" [event] = ‘code’&gt;
  </code></pre>
  
  <p>where the event is something like mouseover and code is something malicious.</p>
  
  <p>I want to allow normal href, but remove anything between the <code>"</code> after <code>.com</code> and the <code>&gt;</code> closing the href.
  I was thinking of looking for the string <code>href</code>, counting 2 quotations and then deleting everything between the 2nd quotation and the <code>&gt;</code>.  </p>
  
  <p>Would this work?  If so, how would I code that?  </p>