Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't know what you are doing in Symfony but it may help to be clear that the following is not a valid URL:</p> <pre><code>example.com/unsubscribe/email/me@example.com </code></pre> <p>What you almost certainly want (and this is true for all browsers!) is:</p> <pre><code>http://example.com/unsubscribe/email/me%40example.com </code></pre> <p>Note: The @ symbol is not safe and must be encoded, the . symbol is safe however (<a href="http://www.ietf.org/rfc/rfc1738.txt" rel="nofollow noreferrer">RFC1738</a>). If you don't escape the @ symbol it will almost certainly cause big trouble so (escaping the . almost certainly won't, but you don't need to so I wouldn't).</p> <p>Problems will occur with not escaping it because @ is reserved as a separator when passing authentication parameters (e.g. <a href="http://username:password@hostname.domain/url/" rel="nofollow noreferrer">http://username:password@hostname.domain/url/</a>). Some URL parsers will work out that you really meant to type %40 if @ occurs after the domain in the URL, but others won't.</p> <p>Rather than just encoding the @ symbol statically you should use one of PHP's URL encoding functions on the email address( e.g. "$emailAddress = <a href="http://php.net/manual/en/function.urlencode.php" rel="nofollow noreferrer">urlencode($emailAddress)</a>;") to ensure other characters in the address are also escaped properly. Don't be tempted to leave this till later or 'after you get it working' do it from the start and save yourself and the end users a headache! :-)</p> <p>NB: There are several ways to encode URL's in PHP, so you will need to read through the documentation page for urlencode() and compare it with other approaches like rawurlencode() to be sure it's what you really want in your case.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload