Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add JSONString and JSONScript functions, update docs, mark templ script as legacy #745

Merged
merged 8 commits into from
May 21, 2024

Conversation

a-h
Copy link
Owner

@a-h a-h commented May 19, 2024

Fixes #739

jsonscript.go Outdated
"io"
)

type CSPContextKeyType int
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this in favour of the templ.GetNonce function in #752

nonce, err := m.generateNonce()
if err != nil {
m.Log.Error("failed to generate nonce", slog.Any("error", err))
http.Error(w, "Internal server error", http.StatusInternalServerError)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not introduced in this PR, but this needs a return here.

@a-h a-h merged commit 85a7b8b into main May 21, 2024
6 checks passed
@a-h a-h deleted the issue_739 branch May 21, 2024 13:27
a-h added a commit that referenced this pull request May 21, 2024
…templ script as legacy in docs (#745)

Co-authored-by: Joe Davidson <joe.davidson.21111@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proposal: add templ.JSONScript and templ.JSON functions
2 participants