diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js
index 136a4135..cd409057 100644
--- a/source/Ox/js/HTML.js
+++ b/source/Ox/js/HTML.js
@@ -49,7 +49,7 @@
tag: {
a: [
[
- /]*?href="((https?:\/\/|mailto:|\/).+?)".*?>/gi,
+ /]*?href="((\/|https?:\/\/|mailto:).+?)".*?>/gi,
'',
],
[
@@ -59,7 +59,7 @@
],
img: [
[
- /
]*?src="((https?:\/\/|\/).+?)".*?>/gi,
+ /
]*?src="((\/|https?:\/\/).+?)".*?>/gi,
'
'
]
],
@@ -347,6 +347,8 @@
'foo'
> Ox.sanitizeHTML('foo')
'<a href="javascript:alert()">foo'
+ > Ox.sanitizeHTML('foo')
+ 'foo'
> Ox.sanitizeHTML('[http://foo.com foo]')
'foo'
> Ox.sanitizeHTML('foo')
@@ -365,7 +367,7 @@
tags = tags || defaultTags;
// html = Ox.clean(html); fixme: can this be a parameter?
if (tags.indexOf('[]') > -1) {
- html = html.replace(/\[((https?:\/\/|mailto:|\/).+?) (.+?)\]/gi, '$3');
+ html = html.replace(/\[((\/|https?:\/\/|mailto:).+?) (.+?)\]/gi, '$3');
tags = tags.filter(function(tag) {
return tag != '[]';
});