title: URL-encoding and HTML-encoding NSStrings
body: <p>Is their a method to encode/decode HTML and URL (in Xcode, using Objective-C)? </p>
  
  <pre><code>[NSString stringWithContentsOfFile:&lt;#(NSString *)path#&gt; encoding:&lt;#(NSStringEncoding)enc#&gt; error:&lt;#(NSError **)error#&gt;]
  </code></pre>
  
  <p>This doesn't seem to work how i expected. I thought it will convert special characters like "&lt;" to equivalent HTML entities i.e. "&lt;" in this case.</p>
  
  <p>Here's a reference to the w3school link related to this topic (general): </p>
  
  <p><a href="http://www.w3schools.com/tags/ref_urlencode.asp" rel="nofollow noreferrer">HTML URL Encoding Reference</a></p>
  
  <p><a href="http://www.w3schools.com/tags/ref_entities.asp" rel="nofollow noreferrer">HTML Entities Reference</a></p>
  
  <p>Thanking in anticipation.</p>