diff --git a/source/Ox/js/HTML.js b/source/Ox/js/HTML.js index 35518f4b..b5cf839b 100644 --- a/source/Ox/js/HTML.js +++ b/source/Ox/js/HTML.js @@ -55,8 +55,10 @@ { 'name': 'a', 'required': ['href'], + 'optional': ['target'], 'validate': { - 'href': /^((https?:\/\/|\/|mailto:).*?)/ + 'href': /^((https?:\/\/|\/|mailto:).*?)/, + 'target': /^_blank$/ } }, {'name': 'br'}, @@ -507,6 +509,8 @@ 'http://www.foo.com/' > Ox.sanitizeHTML('foo') 'foo' + > Ox.sanitizeHTML('foo') + 'foo' > Ox.sanitizeHTML('foo') '<a href="javascript:alert()">foo</a>' > Ox.sanitizeHTML('foo')