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

TextField renders invalid HTML #170

Closed
paulrwest opened this issue Nov 23, 2016 · 1 comment
Closed

TextField renders invalid HTML #170

paulrwest opened this issue Nov 23, 2016 · 1 comment

Comments

@paulrwest
Copy link

The Problem:

field/src/Template/Element/TextField/display.ctp

Surrounds the field with <p> tags then echos out the value of the text field

<p><?= TextToolbox::formatter($field); ?></p>

When using HTML text it results in invalid HTML due to the <p> tags wrapping around the fields HTML - the resulting HTML formatted like so:

<p><p>Hello World</p></p>

Which most browsers now fix the invalid HTML by auto closing and opening the surrounding tags:

<p></p><p>Hello World</p><p></p>

This results in too much padding around all Text fields when being displayed.

The Solution:
Can you remove all <p> tags from this file and let TextToolbox deal with adding any tags needed?

Thanks in advance

@botchris
Copy link
Collaborator

sounds reasonable,
i'll take a look :)

@botchris botchris self-assigned this Nov 30, 2016
botchris pushed a commit that referenced this issue Dec 4, 2016
@botchris botchris closed this as completed Dec 4, 2016
@botchris botchris added Resolved and removed Hold labels Dec 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants