title: The URI you submitted has disallowed characters. encode var in URL
body: <p>I have a registration form in my application. When someone complete the registration receive an email with a link to confirm registration (typical situation).</p>
  
  <p>The link is something like this </p>
  
  <p><a href="http://www.myDomain.com/registration/validation/m0NQGT4XzQgId5zuH/1PrDqNSP7YWq81Mba8cSXLb1WsQ5aVqf2sQ3Ece3ZdmxYvLjztaGp7Xmhv8ArjFET/8Q==" rel="nofollow">http://www.myDomain.com/registration/validation/m0NQGT4XzQgId5zuH/1PrDqNSP7YWq81Mba8cSXLb1WsQ5aVqf2sQ3Ece3ZdmxYvLjztaGp7Xmhv8ArjFET/8Q==</a></p>
  
  <ul>
  <li>registration is the controller</li>
  <li>validation is the function</li>
  <li>and the last one is the username</li>
  </ul>
  
  <p>Encoding the username:</p>
  
  <pre><code>$encrypted_username = $this-&gt;encrypt-&gt;encode($username);
  </code></pre>
  
  <p>But, accessing the link returns the following error</p>
  
  <blockquote>
    <p>The URI you submitted has disallowed characters.</p>
  </blockquote>
  
  <p>Setting <code>$config['permitted_uri_chars'] = '';</code> everything goes right, but they say we shouldn't do this.</p>
  
  <p>So, how can I solve this problem right?</p>