Skip to content

Commit b3ceb09

Browse files
committed
Fix default break attribute outputting wrong doctype value
Thanks, colak
1 parent 1ccc96d commit b3ceb09

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

com_connect.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ function com_connect_text($atts)
726726

727727
extract(com_connect_lAtts(array(
728728
'autocomplete' => '',
729-
'break' => br,
729+
'break' => 'br',
730730
'class' => 'comText',
731731
'default' => '',
732732
'delay' => null,
@@ -952,7 +952,7 @@ function com_connect_email($atts)
952952
// TODO: 'multiple' attribute?
953953
$defaults = array(
954954
'autocomplete' => '',
955-
'break' => br,
955+
'break' => 'br',
956956
'class' => 'comEmail',
957957
'default' => '',
958958
'html_form' => $com_connect_flags['this_form'],
@@ -1024,7 +1024,7 @@ function com_connect_textarea($atts)
10241024

10251025
extract(com_connect_lAtts(array(
10261026
'autocomplete' => '',
1027-
'break' => br,
1027+
'break' => 'br',
10281028
'class' => 'comTextarea',
10291029
'cols' => 58,
10301030
'default' => '',
@@ -1135,7 +1135,7 @@ function com_connect_select($atts, $thing = '')
11351135
global $com_connect_error, $com_connect_submit, $com_connect_flags;
11361136

11371137
extract(com_connect_lAtts(array(
1138-
'break' => br,
1138+
'break' => 'br',
11391139
'class' => 'comSelect',
11401140
'delimiter' => ',',
11411141
'html_form' => $com_connect_flags['this_form'],
@@ -1552,7 +1552,7 @@ function com_connect_file($atts)
15521552

15531553
extract(com_connect_lAtts(array(
15541554
'accept' => '',
1555-
'break' => br,
1555+
'break' => 'br',
15561556
'class' => 'comFile',
15571557
'html_form' => $com_connect_flags['this_form'],
15581558
'isError' => '',
@@ -1976,7 +1976,8 @@ function com_connect_lAtts($pairs, $atts)
19761976
}
19771977
}
19781978

1979-
if (isset($atts['break']) && $atts['break'] === 'br') {
1979+
if ((isset($atts['break']) && $atts['break'] === 'br') ||
1980+
(!isset($atts['break']) && isset($pairs['break']) && $pairs['break'] === 'br')) {
19801981
$atts['break'] = ($doctype === 'xhtml') ? '<br />' : '<br>';
19811982
}
19821983

0 commit comments

Comments
 (0)