Commit 8e56f748 authored by Nigel McNie's avatar Nigel McNie
Browse files

Apply "labelescaped" patch (thanks to Gregor for pointing out it wasn't applied)

parent d8964c23
......@@ -1265,12 +1265,13 @@ EOF;
// Element title
if (isset($element['title']) && $element['title'] !== '') {
$title = (!empty($element['labelescaped'])) ? $element['title'] : self::hsc($element['title']);
if (!empty($element['nolabel'])) {
// Don't bother with a label for the element
$element['labelhtml'] = self::hsc($element['title']);
$element['labelhtml'] = $title;
}
else {
$element['labelhtml'] = '<label for="' . $this->name . '_' . $element['id'] . '">' . Pieform::hsc($element['title']) . '</label>';
$element['labelhtml'] = '<label for="' . $this->name . '_' . $element['id'] . '">' . $title . '</label>';
}
if ($this->get_property('requiredmarker') && !empty($element['rules']['required'])) {
$element['labelhtml'] .= ' <span class="requiredmarker">*</span>';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment