Browse Source

:bug: fix https://github.com/siyuan-note/siyuan/issues/11321

Vanessa 1 year ago
parent
commit
178a7e8d77
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/src/protyle/toolbar/index.ts
  2. 1 1
      app/stage/protyle/js/protyle-html.js

+ 1 - 1
app/src/protyle/toolbar/index.ts

@@ -995,7 +995,7 @@ export class Toolbar {
         /// #endif
         /// #endif
         const textElement = this.subElement.querySelector(".b3-text-field") as HTMLTextAreaElement;
         const textElement = this.subElement.querySelector(".b3-text-field") as HTMLTextAreaElement;
         if (types.includes("NodeHTMLBlock")) {
         if (types.includes("NodeHTMLBlock")) {
-            textElement.value = Lute.UnEscapeHTMLStr(renderElement.querySelector("protyle-html").getAttribute("data-content") || "");
+            textElement.value = renderElement.querySelector("protyle-html").getAttribute("data-content") || "";
         } else if (isInlineMemo) {
         } else if (isInlineMemo) {
             textElement.value = Lute.UnEscapeHTMLStr(renderElement.getAttribute("data-inline-memo-content") || "");
             textElement.value = Lute.UnEscapeHTMLStr(renderElement.getAttribute("data-inline-memo-content") || "");
         } else {
         } else {

+ 1 - 1
app/stage/protyle/js/protyle-html.js

@@ -7,7 +7,7 @@ class ProtyleHtml extends HTMLElement {
     super()
     super()
     const shadowRoot = this.attachShadow({mode: 'open'})
     const shadowRoot = this.attachShadow({mode: 'open'})
     this.display = this.shadowRoot
     this.display = this.shadowRoot
-    const dataContent = Lute.UnEscapeHTMLStr(this.getAttribute('data-content'))
+    const dataContent = this.getAttribute('data-content')
     this.display.innerHTML = dataContent
     this.display.innerHTML = dataContent
   }
   }