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
|
||||
true
|
||||
@*/
|
||||
Ox.encodeEmailAddress = function(string) {
|
||||
var parts = ['mailto:' + string, string].map(function(part) {
|
||||
Ox.encodeEmailAddress = function(address, text) {
|
||||
text = text || address;
|
||||
var parts = ['mailto:' + address, text].map(function(part) {
|
||||
return Ox.map(part, function(char) {
|
||||
var code = char.charCodeAt(0);
|
||||
return char == ':' ? ':'
|
||||
|
|
Loading…
Reference in a new issue