Fix editing messages with html tags
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import {PublishStatus} from "@welshman/net"
|
||||
import {displayRelayUrl} from "@welshman/util"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import {addPeriod} from "@lib/util"
|
||||
|
||||
interface Props {
|
||||
url: string
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
<div class="card2 bg-alt col-2 shadow-lg">
|
||||
<p>
|
||||
Failed to publish to {displayRelayUrl(url)}: {message}.
|
||||
Failed to publish to {displayRelayUrl(url)}: {addPeriod(message)}
|
||||
</p>
|
||||
<Button class="link" onclick={retry}>Retry</Button>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
} from "@welshman/app"
|
||||
import type {FileAttributes} from "@welshman/editor"
|
||||
import {Editor, MentionSuggestion, WelshmanExtension, editorProps} from "@welshman/editor"
|
||||
import {escapeHtml} from "@lib/html"
|
||||
import {makeMentionNodeView} from "@app/editor/MentionNodeView"
|
||||
import ProfileSuggestion from "@app/editor/ProfileSuggestion.svelte"
|
||||
import {uploadFile} from "@app/core/commands"
|
||||
@@ -82,7 +83,7 @@ export const makeEditor = async ({
|
||||
)
|
||||
|
||||
return new Editor({
|
||||
content,
|
||||
content: escapeHtml(content),
|
||||
autofocus,
|
||||
editorProps,
|
||||
element: document.createElement("div"),
|
||||
|
||||
Reference in New Issue
Block a user