diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts
index 8dca51229..1d2fe0c5d 100644
--- a/app/src/protyle/hint/extend.ts
+++ b/app/src/protyle/hint/extend.ts
@@ -307,13 +307,13 @@ export const hintRef = (key: string, protyle: IProtyle, isQuick = false): IHintD
const iconName = getIconByType(item.type);
let attrHTML = "";
if (item.name) {
- attrHTML += ` ${item.name}`;
+ attrHTML += ` ${escapeHtml(item.name)}`;
}
if (item.alias) {
- attrHTML += ` ${item.alias}`;
+ attrHTML += ` ${escapeHtml(item.alias)}`;
}
if (item.memo) {
- attrHTML += ` ${item.memo}`;
+ attrHTML += ` ${escapeHtml(item.memo)}`;
}
if (attrHTML) {
attrHTML = `
${attrHTML}
`;
@@ -326,9 +326,9 @@ export const hintRef = (key: string, protyle: IProtyle, isQuick = false): IHintD
value,
html: `${attrHTML}
- ${item.content}
+ ${escapeHtml(item.content)}
-${escapeHtml(item.hPath)}
`,
+${item.hPath}
`,
});
});
if (isQuick) {
@@ -363,13 +363,13 @@ export const hintEmbed = (key: string, protyle: IProtyle): IHintData[] => {
const iconName = getIconByType(item.type);
let attrHTML = "";
if (item.name) {
- attrHTML += ` ${item.name}`;
+ attrHTML += ` ${escapeHtml(item.name)}`;
}
if (item.alias) {
- attrHTML += ` ${item.alias}`;
+ attrHTML += ` ${escapeHtml(item.alias)}`;
}
if (item.memo) {
- attrHTML += ` ${item.memo}`;
+ attrHTML += ` ${escapeHtml(item.memo)}`;
}
if (attrHTML) {
attrHTML = `${attrHTML}
`;
@@ -378,7 +378,7 @@ export const hintEmbed = (key: string, protyle: IProtyle): IHintData[] => {
value: `{{select * from blocks where id='${item.id}'}}`,
html: `${attrHTML}
- ${item.content}
+ ${escapeHtml(item.content)}
${item.hPath}
`,
});
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index 1fed739bf..11ea7f02d 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -297,13 +297,13 @@ ${unicode2Emoji(emoji.unicode, true)}`;
const iconName = getIconByType(item.type);
let attrHTML = "";
if (item.name) {
- attrHTML += ` ${item.name}`;
+ attrHTML += ` ${escapeHtml(item.name)}`;
}
if (item.alias) {
- attrHTML += ` ${item.alias}`;
+ attrHTML += ` ${escapeHtml(item.alias)}`;
}
if (item.memo) {
- attrHTML += ` ${item.memo}`;
+ attrHTML += ` ${escapeHtml(item.memo)}`;
}
if (attrHTML) {
attrHTML = `${attrHTML}
`;
@@ -311,9 +311,9 @@ ${unicode2Emoji(emoji.unicode, true)}`;
const blockRefHTML = `${oldValue}`;
searchHTML += ``;
+${item.hPath}
`;
});
if (searchHTML === "") {
searchHTML = ``;