We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be3d0ac commit acbb19bCopy full SHA for acbb19b
src/core/render/tpl.js
@@ -1,3 +1,5 @@
1
+import { escapeHtml } from './utils';
2
+
3
/**
4
* Render github corner
5
* @param {Object} data URL for the View Source on Github link
@@ -91,7 +93,9 @@ export function tree(toc, tpl = '<ul class="app-sub-sidebar">{inner}</ul>') {
91
93
92
94
let innerHTML = '';
95
toc.forEach(node => {
- innerHTML += `<li><a class="section-link" href="${node.slug}" title="${node.title}">${node.title}</a></li>`;
96
+ innerHTML += `<li><a class="section-link" href="${
97
+ node.slug
98
+ }" title="${escapeHtml(node.title)}">${node.title}</a></li>`;
99
if (node.children) {
100
innerHTML += tree(node.children, tpl);
101
}
0 commit comments