mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-04 11:44:47 +08:00
fix(autolinker): Always override title attribute #2056
This commit is contained in:
parent
e4a0c94482
commit
aa42040813
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ export function autolink(doc, {async} = {}) {
|
||||||
// Traverse the new DOM tree and make sure everything with an href has a title.
|
// Traverse the new DOM tree and make sure everything with an href has a title.
|
||||||
const aTagWalker = document.createTreeWalker(doc.body, NodeFilter.SHOW_ELEMENT, {
|
const aTagWalker = document.createTreeWalker(doc.body, NodeFilter.SHOW_ELEMENT, {
|
||||||
acceptNode: (node) =>
|
acceptNode: (node) =>
|
||||||
(node.href && !node.title) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
|
node.href ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
|
||||||
,
|
,
|
||||||
});
|
});
|
||||||
while (aTagWalker.nextNode()) {
|
while (aTagWalker.nextNode()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue