This commit is contained in:
Daniel 2024-11-25 22:06:54 +08:00
parent 497b7829f1
commit 9dade3b29a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 3 additions and 1 deletions

View file

@ -493,6 +493,7 @@ func buildBlockBreadcrumb(node *ast.Node, excludeTypes []string, isEmbedBlock bo
}
name = strings.ReplaceAll(name, editor.Caret, "")
name = util.UnescapeHTML(name)
name = util.EscapeHTML(name)
if !isEmbedBlock && parent == node {

View file

@ -18,13 +18,13 @@ package model
import (
"bytes"
"github.com/88250/lute/editor"
"regexp"
"strings"
"github.com/88250/gulu"
"github.com/88250/lute"
"github.com/88250/lute/ast"
"github.com/88250/lute/editor"
"github.com/88250/lute/html"
"github.com/88250/lute/parse"
"github.com/88250/lute/render"
@ -110,6 +110,7 @@ func renderBlockText(node *ast.Node, excludeTypes []string) (ret string) {
ret = sql.NodeStaticContent(node, excludeTypes, false, false, false)
ret = strings.TrimSpace(ret)
ret = strings.ReplaceAll(ret, "\n", "")
ret = util.UnescapeHTML(ret)
ret = util.EscapeHTML(ret)
ret = strings.TrimSpace(ret)
if "" == ret {