🎨 Improve escaping https://ld246.com/article/1732501061120
This commit is contained in:
parent
497b7829f1
commit
9dade3b29a
2 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue