diff --git a/app/src/editor/rename.ts b/app/src/editor/rename.ts index e7514f798..f8baea7dc 100644 --- a/app/src/editor/rename.ts +++ b/app/src/editor/rename.ts @@ -56,7 +56,7 @@ export const rename = (options: { if (window.siyuan.config.readonly) { return; } - const initialName = options.empty ? "" : Lute.UnEscapeHTMLStr(options.name); + const initialName = options.empty ? "" : options.name; const dialog = new Dialog({ title: window.siyuan.languages.rename, content: `
diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index 15f6e1106..75bd6d0f8 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -36,7 +36,8 @@ import {setStorageVal} from "../protyle/util/compatibility"; export const setPanelFocus = (element: Element, isSaveLayout = true) => { if (element.getAttribute("data-type") === "wnd") { - setTitle(element.querySelector('.layout-tab-bar .item--focus[data-type="tab-header"] .item__text')?.textContent || "", true); + const title = element.querySelector('.layout-tab-bar .item--focus[data-type="tab-header"] .item__text')?.textContent || ""; + setTitle(title, title ? false : true); } if (element.classList.contains("layout__tab--active") || element.classList.contains("layout__wnd--active")) { return;