fix <a> regexp to allow for href="/"
This commit is contained in:
parent
65ecc61112
commit
89408bd4be
1 changed files with 3 additions and 1 deletions
|
@ -29,7 +29,7 @@
|
|||
replace = {
|
||||
a: [
|
||||
[
|
||||
/<a [^<>]*?href="((\/|https?:\/\/|mailto:).+?)".*?>/gi,
|
||||
/<a [^<>]*?href="((\/|https?:\/\/|mailto:).*?)".*?>/gi,
|
||||
'<a href="{1}">',
|
||||
],
|
||||
[
|
||||
|
@ -482,6 +482,8 @@
|
|||
'<a href="foo">foo'
|
||||
> Ox.sanitizeHTML('<a href="/foo">foo</a>')
|
||||
'<a href="/foo">foo</a>'
|
||||
> Ox.sanitizeHTML('<a href="/">foo</a>')
|
||||
'<a href="/">foo</a>'
|
||||
> Ox.sanitizeHTML('[http://foo.com foo]')
|
||||
'<a href="http://foo.com">foo</a>'
|
||||
> Ox.sanitizeHTML('<rtl>foo</rtl>')
|
||||
|
|
Loading…
Reference in a new issue