update Ox.encodeEmailAddress
This commit is contained in:
parent
fda5c7eaa2
commit
85ef28078b
1 changed files with 3 additions and 2 deletions
|
@ -188,8 +188,9 @@
|
||||||
> Ox.encodeEmailAddress('mailto:foo@bar.com').indexOf(':') > -1
|
> Ox.encodeEmailAddress('mailto:foo@bar.com').indexOf(':') > -1
|
||||||
true
|
true
|
||||||
@*/
|
@*/
|
||||||
Ox.encodeEmailAddress = function(string) {
|
Ox.encodeEmailAddress = function(address, text) {
|
||||||
var parts = ['mailto:' + string, string].map(function(part) {
|
text = text || address;
|
||||||
|
var parts = ['mailto:' + address, text].map(function(part) {
|
||||||
return Ox.map(part, function(char) {
|
return Ox.map(part, function(char) {
|
||||||
var code = char.charCodeAt(0);
|
var code = char.charCodeAt(0);
|
||||||
return char == ':' ? ':'
|
return char == ':' ? ':'
|
||||||
|
|
Loading…
Reference in a new issue