mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🐛 引用锚文本转义
This commit is contained in:
parent
4ed549cdb1
commit
e3d0573b5a
1 changed files with 2 additions and 1 deletions
|
|
@ -73,7 +73,8 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
|
||||||
});
|
});
|
||||||
inputElement.addEventListener("input", () => {
|
inputElement.addEventListener("input", () => {
|
||||||
if (inputElement.value) {
|
if (inputElement.value) {
|
||||||
element.textContent = Lute.EscapeHTMLStr(inputElement.value);
|
// 不能使用 textContent,否则 < 会变为 <
|
||||||
|
element.innerHTML = Lute.EscapeHTMLStr(inputElement.value);
|
||||||
} else {
|
} else {
|
||||||
fetchPost("/api/block/getRefText", {id: refBlockId}, (response) => {
|
fetchPost("/api/block/getRefText", {id: refBlockId}, (response) => {
|
||||||
element.innerHTML = response.data;
|
element.innerHTML = response.data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue