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

fix: go escape constant attributes #725

Merged
merged 8 commits into from
May 6, 2024

Conversation

Robert-Kolmos
Copy link
Contributor

@Robert-Kolmos Robert-Kolmos commented May 3, 2024

Fixes #624, Go escapes constant attribute strings.

This changes the previous behavior where these strings were treated as go strings. If someone previously had

templ foo() {
    <input pattern="\\s">
}

this will now generate
<input pattern="\\s"/> instead of <input pattern="\s"/> like the current latest version would generate.

@Robert-Kolmos Robert-Kolmos changed the title Go escape constant attributes, fixes #624 fix: go escape constant attributes May 3, 2024
@a-h a-h merged commit 89f216e into a-h:main May 6, 2024
4 checks passed
@a-h
Copy link
Owner

a-h commented May 6, 2024

Thanks a lot for the contribution. Much appreciated!

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.

bug: backslashes in constant string attributes cannot be generated
2 participants