You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Desktop, Mobile: Fixes #5687: Fixed issue with parts of HTML notes not being displayed in some cases
This commit is contained in:
@@ -192,6 +192,15 @@ class HtmlUtils {
|
||||
}
|
||||
}
|
||||
|
||||
// For some reason, entire parts of HTML notes don't show up in
|
||||
// the viewer when there's an anchor tag without an "href"
|
||||
// attribute. It doesn't always happen and it seems to depend on
|
||||
// what else is in the note but in any case adding the "href"
|
||||
// fixes it. https://github.com/laurent22/joplin/issues/5687
|
||||
if (name.toLowerCase() === 'a' && !attrs['href']) {
|
||||
attrs['href'] = '#';
|
||||
}
|
||||
|
||||
let attrHtml = this.attributesHtml(attrs);
|
||||
if (attrHtml) attrHtml = ` ${attrHtml}`;
|
||||
const closingSign = this.isSelfClosingTag(name) ? '/>' : '>';
|
||||
|
||||
Reference in New Issue
Block a user