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

Implemented tag for custom css class for input field #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vldmr-k
Copy link

@vldmr-k vldmr-k commented Oct 8, 2022

No description provided.

@vldmr-k
Copy link
Author

vldmr-k commented Oct 11, 2022

Is anybody here?)

@joncalhoun
Copy link
Owner

Busy, but I'll look at this when I have time.

Copy link
Owner

@joncalhoun joncalhoun left a comment

Choose a reason for hiding this comment

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

I think this should be fine to merge in, but I had a Q about why HTMLEscapeString was used beforehand.

@@ -101,6 +101,9 @@ func applyTags(f *field, tags map[string]string) {
// Probably shouldn't be HTML but whatever.
f.Footer = template.HTML(v)
}
if v, ok := tags["class"]; ok {
f.Class = template.HTMLEscapeString(v)
Copy link
Owner

Choose a reason for hiding this comment

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

What is the reasoning behind doing HTMLEscapeString? I'm trying to think of a case where this would have something that needs escaped as part of the class and none are coming to mind.

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.

2 participants