Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ function LinkerPluginShell() {
return `<a href=${encodeURI(this.queryCache.get(docPath) || "")}>${linkText}</a>`;
}
if (isDataType(docPath)) {
let link = docPath.template;
let link = docPath.template
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
Comment on lines +197 to +198
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you must escape ", ' and & then too.
ref: https://stackoverflow.com/a/40285312/8035872

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Oops.


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