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

Form rendering incorrect #10

Open
adamlwgriffiths opened this issue Mar 29, 2021 · 0 comments
Open

Form rendering incorrect #10

adamlwgriffiths opened this issue Mar 29, 2021 · 0 comments

Comments

@adamlwgriffiths
Copy link

adamlwgriffiths commented Mar 29, 2021

It looks like the HTML_VOID_TAGS logic breaks a few tags.

For example, given the following input:

['html', ['body', ['form',
    ['input', 'abc123'],
    ['input', 'my-username'],
    ['input', 'my-password'],
    ['input', {'type': 'submit'}, 'Submit']
]]]

I get the following output:

<html><body><form>
<input>abc123
<input>my-username
<input>my-password
<input type="submit">Submit
</form></body></html>

Notice the lack of closing </input> tags

It looks like the void tag logic should be ignored if there is an enclosed value. Alternatively, shouldn't be in the VOID tags list.

adamlwgriffiths added a commit to adamlwgriffiths/cottonmouth that referenced this issue Mar 29, 2021
Fix nosamanuel#10 by removing 'input' from VOID tags list.
Simplify some logic with f-strings.
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

No branches or pull requests

1 participant