Mentions opens in a new tab.
-
@julian said:
html anchors with no attribute
@frissdiegurke sent this a couple days back not sure if handles this case.
-
@baris Looks like it should, but I'm guessing no.
Upon further reflection, it seems an anchor tag with no
href
attribute is perfectly valid, so I won't be submitting a patch upstream.I imagine if href is missing,
this.href
would beundefined
, no?Let me add that in and see.
Edit: @Scuzz, try after this commit: https://github.com/NodeBB/NodeBB/commit/186473fa7bb6366bbaec52866a1a3dd1ae96aceb
-
@julian said:
I imagine if href is missing, this.href would be undefined, no? smile
No.
I was surprised that it's been an empty string that got checked instead of
undefined
too, but it seems I'm to adapted to jQuery ^^This is because you use the DOM-element rather than jQuery to get the
href
:
document.createElement('a').href === ''
$('<a></a>').attr('href') === undefined