Skip to content

field_errors_block.html: insert missing space between attributes#221

Merged
smithdc1 merged 1 commit intodjango-crispy-forms:mainfrom
cheuberg:patch-2
Mar 1, 2026
Merged

field_errors_block.html: insert missing space between attributes#221
smithdc1 merged 1 commit intodjango-crispy-forms:mainfrom
cheuberg:patch-2

Conversation

@cheuberg
Copy link
Copy Markdown
Contributor

No description provided.

@smithdc1
Copy link
Copy Markdown
Member

smithdc1 commented Mar 1, 2026

Thanks!

Not sure what to do about improving tests for this. The Python HTML parser seems quite permissive and is splitting the attributes.

In [2]: from html.parser import HTMLParser
   ...: 
   ...: class AttrPrinter(HTMLParser):
   ...:     def handle_starttag(self, tag, attrs):
   ...:         print(f"Tag: <{tag}>")
   ...:         for name, value in attrs:
   ...:             print(f"  attr: {name!r} = {value!r}")
   ...: 
   ...: p = AttrPrinter()
   ...: p.feed('<div id="foo_error"class="invalid-feedback">')
Tag: <div>
  attr: 'id' = 'foo_error'
  attr: 'class' = 'invalid-feedback'

@smithdc1 smithdc1 merged commit 80dda25 into django-crispy-forms:main Mar 1, 2026
6 checks passed
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