Skip to content

Commit

Permalink
Fixed #1166 - When setting a style to part of a (section) title in th…
Browse files Browse the repository at this point in the history
…e bootstrap causes an error and the whole section invisible
  • Loading branch information
torinfo committed Oct 7, 2022
1 parent dd6af24 commit 3bb4a0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/site/parent_templates/site/common/js/application.js
Expand Up @@ -1804,10 +1804,11 @@ function loadSection(thisSection, section, sectionIndex, page, pageHash, pageInd

// remove size & background color styles from links on toc
if ($('<p>' + subLinkName + '</p>').children().length > 0) {
subLinkName = $(subLinkName);
subLinkName = $("<div>").html(subLinkName);
subLinkName.css({ 'font-size': '', 'background-color': 'transparent' });
subLinkName.find('[style*="font-size"]').css('font-size', '');
subLinkName.find('[style*="background-color"]').css('background-color', 'transparent');
subLinkName = subLinkName.html();
}

var tempLink = validPages.indexOf(pageIndex) != -1 ? 'page' + (validPages.indexOf(pageIndex)+1) : (page.attr("customLinkID") != "" && page.attr("customLinkID") != undefined ? page.attr("customLinkID") : page.attr('linkID'));
Expand Down

0 comments on commit 3bb4a0d

Please sign in to comment.