diff --git a/client/js/views/top_nav_view.js b/client/js/views/top_nav_view.js index 2369553a..6fa4c8a2 100644 --- a/client/js/views/top_nav_view.js +++ b/client/js/views/top_nav_view.js @@ -13,10 +13,11 @@ class TopNavView { const target = this.navHolder; const source = this.template(ctx); - for (let link of source.querySelectorAll('a span.text')) { + for (let link of source.querySelectorAll('a')) { const regex = new RegExp( '(' + link.getAttribute('accesskey') + ')', 'i'); - link.innerHTML = link.textContent.replace( + const span = link.querySelector('span.text'); + span.innerHTML = span.textContent.replace( regex, '$1'); }