Enclavely / tailor

Build beautiful page layouts quickly and easily using your favourite WordPress theme.
https://www.tailorwp.com
GNU General Public License v3.0
1.05k stars 102 forks source link

Colons are removed from markup #129

Open brendanlawton opened 7 years ago

brendanlawton commented 7 years ago

How to reproduce the error Add a colon to a label for a form element e.g. Name:

Expected result Colon shows up in widget admin field label

Actual result Colon is removed

Notes If you place multiple colons in the label the first one is removed and the rest are visible

andrew-worsfold commented 7 years ago

@brendanlawton -

Just to clarify, is this native WordPress widget form label, or a control label for a Tailor element?

brendanlawton commented 7 years ago

@andrew-worsfold it's a label for an input field in a twig file that is rendered as part of a custom WP_Widget. Here's an example:

<label for="{{ post.fieldId }}">{{ loop.index }}:</label>

// above example outputs the loop.index but no colon

andrew-worsfold commented 7 years ago

@brendanlawton -

This was by design, in order to bring widget forms into line with default Tailor/Customizer controls. Could you provide an example that shows why it's important to leave the colon in place?