Skip to content

Commit

Permalink
fix(cli): web_dev_server html template serialization (fix #6165) (#6166)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
  • Loading branch information
AlainSchneble and lucasfernog committed Jan 29, 2023
1 parent f7ac2e9 commit 314f0e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/fix-dev-server-html-serialization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Fixes HTML serialization removing template tags on the dev server.
2 changes: 1 addition & 1 deletion tooling/cli/src/helpers/web_dev_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async fn handler<T>(req: Request<T>, state: Arc<State>) -> impl IntoResponse {
head.prepend(script_el);
});

f = document.to_string().as_bytes().to_vec();
f = tauri_utils::html::serialize_node(&document);
}

(StatusCode::OK, [(CONTENT_TYPE, mime_type)], f)
Expand Down

0 comments on commit 314f0e2

Please sign in to comment.