Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

submit via GET an email address avoiding url encoding?

Tags:

forms

email

I might have a freudian lips but i cant figure out how to send an email address to a specific url without the url encodes the AT symbol in %40... basically i have a basic form

<form class="firstLoginform" id="firstLoginform"  name="firstLoginform"  method="get" action="https://myurl" >

<label for="email" >Email Address</label>
<input type="text" name="userEmail" id="userEmail"  size="20" maxlength="150">

<center>
<input type="submit" value="submit" />
</center>
</form>

but i submit the form the url is gonna be like

https://myurl?userEmail=myemail%40mydomain.com

but I NEED, for soe reason of the previous settings a ul like this

https://[email protected]

i dont have access to the page that is receiving the variables...so i wonder if i can send the email address AS IS..

thanks!!!

like image 885
Francesco Avatar asked Dec 09 '22 14:12

Francesco


2 Answers

No, you can't according to RFC1738, the URL Spec. The @ symbol is reserved because it has a special meaning.

like image 96
Alan Avatar answered Jan 16 '23 15:01

Alan


As Alan mentioned the URL specification (RFC1738) forbids the use of the @ symbol in URLs because it's reserved for use within any type of URL. An example of this would be an FTP URL which provides the option to specify a [email protected] syntax.

Section 3 of the RFC shows a number of cases that use the @ symbol in a URL.

For this reason @ along with a number of other characters can't be used as part of an HTTP URL.

like image 22
kdmurray Avatar answered Jan 16 '23 14:01

kdmurray