From 89408bd4be3961bd4a94f777dcbaee6502bb4804 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 27 Feb 2013 16:27:44 +0530 Subject: [PATCH] fix regexp to allow for href="/" --- source/Ox/js/HTML.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js index 5db1462e..0dbb2498 100644 --- a/source/Ox/js/HTML.js +++ b/source/Ox/js/HTML.js @@ -29,7 +29,7 @@ replace = { a: [ [ - /]*?href="((\/|https?:\/\/|mailto:).+?)".*?>/gi, + /]*?href="((\/|https?:\/\/|mailto:).*?)".*?>/gi, '', ], [ @@ -482,6 +482,8 @@ '<a href="foo">foo' > Ox.sanitizeHTML('foo') 'foo' + > Ox.sanitizeHTML('foo') + 'foo' > Ox.sanitizeHTML('[http://foo.com foo]') 'foo' > Ox.sanitizeHTML('foo')