Skip to content

Commit 95a7fa9

Browse files
committed
Replace "<", ">" tokens in data type links with HTML safe counterparts.
1 parent a58f43b commit 95a7fa9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/webdoc-template-library/src/template-plugins/LinkerPlugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ function LinkerPluginShell() {
193193
return `<a href=${encodeURI(this.queryCache.get(docPath) || "")}>${linkText}</a>`;
194194
}
195195
if (isDataType(docPath)) {
196-
let link = docPath.template;
196+
let link = docPath.template
197+
.replace(/</g, "&lt;")
198+
.replace(/>/g, "&gt;");
197199

198200
for (let i = 1; i < docPath.length; i++) {
199201
link = link.replace(`%${i}`, this.linkTo(docPath[i], docPath[i], options));

0 commit comments

Comments
 (0)