mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
don't wrap images in links if the link is blank, fixes #4976
This commit is contained in:
@@ -335,6 +335,10 @@ define('forum/topic/posts', [
|
|||||||
src = $this.attr('src'),
|
src = $this.attr('src'),
|
||||||
suffixRegex = /-resized(\.[\w]+)?$/;
|
suffixRegex = /-resized(\.[\w]+)?$/;
|
||||||
|
|
||||||
|
if (src === 'about:blank') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (utils.isRelativeUrl(src) && suffixRegex.test(src)) {
|
if (utils.isRelativeUrl(src) && suffixRegex.test(src)) {
|
||||||
src = src.replace(suffixRegex, '$1');
|
src = src.replace(suffixRegex, '$1');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user