We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
<img>
src
<a>
href
1 parent fdcbf41 commit 9d785c6Copy full SHA for 9d785c6
1 file changed
assets/js/weasyl-markdown.js
@@ -93,7 +93,7 @@ const weasylMarkdown = fragment => {
93
const links = fragment.getElementsByTagName('a');
94
95
forEach(links, link => {
96
- const href = link.getAttribute('href');
+ const href = link.getAttribute('href') || '';
97
const i = href.indexOf(':');
98
const scheme = href.substring(0, i);
99
const user = href.substring(i + 1);
@@ -131,7 +131,7 @@ const weasylMarkdown = fragment => {
131
const images = fragment.querySelectorAll('img');
132
133
forEach(images, image => {
134
- const src = image.getAttribute('src');
+ const src = image.getAttribute('src') || '';
135
const i = src.indexOf(':');
136
const scheme = src.substring(0, i);
137
const link = document.createElement('a');
0 commit comments