Skip to content

Self-closing tag ending as per doctype setting#85

Merged
Bloke merged 1 commit intotextpattern:mainfrom
jools-r:main
Nov 9, 2022
Merged

Self-closing tag ending as per doctype setting#85
Bloke merged 1 commit intotextpattern:mainfrom
jools-r:main

Conversation

@jools-r
Copy link
Copy Markdown
Member

@jools-r jools-r commented Nov 9, 2022

Changes the self-closing tag ending according to HTML5 or XHTML doctype setting. Together with a similar patch for the core, this pleases the W3C validator.

Possible side effects: can produce a warm glow ;-)

Pleases the W3C validator.

Self-closing tag ending acc. to doctype setting

Pleases the W3C validator.
Comment thread com_connect.php
return ($labelStr && $label_position === 'before' ? $labelStr . $break : '') .
'<input type="radio"'. $classStr . ($attr ? ' ' . implode(' ', $attr) : '') .
( $is_checked ? ' checked' . (($doctype === 'xhtml') ? '="checked"' : ''). ' />' : ' />') .
( $is_checked ? ' checked' . (($doctype === 'xhtml') ? '="checked"' : '') : '') . (($doctype === 'xhtml') ? ' />' : '>') .
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this line. I might be reading it wrong but there seems to be an additional : '') that's snuck in and I can't see the corresponding ternary ?. What am I missing?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, ignore me. Spotted it.

@Bloke Bloke merged commit f38015d into textpattern:main Nov 9, 2022
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

Successfully merging this pull request may close these issues.

2 participants