Merge branch 'main' into use_http_client_2

This commit is contained in:
SleeplessOne1917 2023-06-09 00:59:39 +00:00 committed by GitHub
commit a1393131f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -26,6 +26,7 @@ import {
favIconUrl,
initializeSite,
isAuthPath,
md,
} from "../shared/utils";
const server = express();
@ -353,7 +354,9 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) {
<!DOCTYPE html>
<html ${helmet.htmlAttributes.toString()} lang="en">
<head>
<script>window.isoData = ${JSON.stringify(isoData)}</script>
<script>window.isoData = ${md.utils.escapeHtml(
JSON.stringify(isoData)
)}</script>
<script>window.lemmyConfig = ${serialize(config)}</script>
<!-- A remote debugging utility for mobile -->

View file

@ -488,6 +488,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
const pForm = i.state.form;
const pv = i.props.post_view;
if (pv) {
i.props.onEdit?.({
name: pForm.name,
@ -495,7 +496,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
body: pForm.body,
nsfw: pForm.nsfw,
post_id: pv.post.id,
language_id: pv.post.language_id,
language_id: pForm.language_id,
auth,
});
} else if (pForm.name && pForm.community_id) {