title: Using HTML Purifier to stop links to own site
body: <p>I have used <a href="http://htmlpurifier.org/" rel="nofollow noreferrer">HTML purifier</a> to weed out any suspect stuff coming in from my public facing WYSIWYG editor. The incoming HTML is also displayed in the public portion of the website.</p>
  
  <p>I have allowed links, and I also automatically linkify URLs in plain text (using the purifier).</p>
  
  <p>Is there a way to allow external links, but ban links to the same domain? E.g my domain is www.example.com</p>
  
  <p><a href="http://www.google.com" rel="nofollow noreferrer">http://www.google.com</a> will be linked.</p>
  
  <p><a href="http://www.example.com/logout/" rel="nofollow noreferrer">http://www.example.com/logout/</a> will not be linked.</p>
  
  <p>I am looking at minimizing any interference from malicious users. Should I just make my logout link a form action with a POST key/value pair to stop this from happening?</p>
  
  <p>Thanks</p>