diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js index e151dec1..2e6dda15 100644 --- a/source/Ox/js/HTML.js +++ b/source/Ox/js/HTML.js @@ -15,7 +15,9 @@ Ox.parseEmailAddresses = function(html) { /*@ Ox.parseHTML Takes HTML from an untrusted source and returns something sane > Ox.parseHTML('http://foo.com, bar') - 'foo.com, bar' + 'http://foo.com, bar' + > Ox.parseHTML('http://foo.com/foobar?foo, bar') + 'http://foo.com/foobar?foo, bar' > Ox.parseHTML('(see: www.foo.com)') '(see: www.foo.com)' > Ox.parseHTML('foo@bar.com') @@ -73,8 +75,8 @@ Ox.parseHTML = (function() { }, tab = '\t'; return function(html, tags, wikilinks) { - var matches = [], - tags = tags || defaultTags; + var matches = []; + tags = tags || defaultTags; // html = Ox.clean(html); fixme: can this be a parameter? if (tags.indexOf('[]') > -1) { html = html.replace(/\[(https?:\/\/.+?) (.+?)\]/gi, '$2'); @@ -101,7 +103,7 @@ Ox.parseHTML = (function() { // close extra opening (and remove extra closing) tags // note: this converts '"' to '"' return Ox.element('
').html(html).html(); - } + }; }()); /*@ @@ -153,10 +155,9 @@ Ox.parseURLs = function(html) { function(str, url, pre, end) { url = (pre == 'www.' ? 'http://' : '' ) + url; return Ox.formatString( - '{host}{end}', + '{url}{end}', { end: end, - host: Ox.parseURL(url).hostname, url: url } );