minor changes in OxJS

This commit is contained in:
rolux 2012-01-06 17:27:54 +05:30
commit f76ee0cf36
6 changed files with 16 additions and 6 deletions

View file

@ -4,6 +4,7 @@
Ox.parseEmailAddresses <f> Takes HTML and turns e-mail addresses into links
@*/
// fixme: no tests
// fixme: shouldn't this be formatEmailAddresses?
Ox.parseEmailAddresses = function(html) {
return html.replace(
/\b([0-9A-Z\.\+\-_]+@(?:[0-9A-Z\-]+\.)+[A-Z]{2,6})\b/gi,
@ -144,8 +145,8 @@ Ox.parseURL = (function() {
/*@
Ox.parseURLs <f> Takes HTML and turns URLs into links
@*/
// fixme: is parseURLs the right name?
// fixme: no tests
// fixme: shouldn't this be formatURLs?
Ox.parseURLs = function(html) {
return html.replace(
/\b((https?:\/\/|www\.).+?)([\.,:;!\?\)\]]*?(\s|$))/gi,