#37944 closed defect (bug) (invalid)
review of opening tags immediately followed by closing tags of same type
Reported by: | Presskopp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Poking the core files I found some of these:
<div></div>
(10 hits in 7 files) and <span></span>
(9 hits in 8 files)
We also find <ul></ul>
, <li></li>
, ...?
I wonder if these can be safely deleted.
Change History (6)
#2
@
8 years ago
Ah, ok, now it makes some sense to me.
There is a return '<li></li>';
in customize-controls.js
, L.509.
Will see if i still find surplus ones.
same with <strong>
, see
https://core.trac.wordpress.org/ticket/37280#comment:5
#3
@
8 years ago
There is a
return '<li></li>';
in customize-controls.js , L.509.
Ah so there is, I had excluded JS from my greps.. That particular case gets content injected into the <li>
elsewhere, as it's just the container for more content from other parts of the control.
#4
follow-up:
↓ 5
@
8 years ago
Ok, last chance to keep this ticket alive:
<label><span></span>
in class-wp-editor.php
, L.1436
Do we need this one?
All the others are indispensable placeholders, as I understand now, do I?
#5
in reply to:
↑ 4
@
8 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Replying to Presskopp:
Ok, last chance to keep this ticket alive:
<label><span></span>
inclass-wp-editor.php
, L.1436
Do we need this one?
If you look at where it's output in the UI, you'll find that yes, it's needed. It's an empty placeholder to ensure menu alignments in the advanced link editing dialogue. If you remove it you'll see the layout break slightly.
I'm marking this ticket as invalid, but feel free to create additional tickets for any HTML tags which once removed you've verified don't alter the UI where it's used.
The ones I can find appear to be needed, based on their locations
Appears that this would get filled with
<li>
's from an ajax requestI don't see any of those
All in all, these tags are usually like this within either HTML templates for JS actions, or are used for styling purposes (for example, nested
:before
's.If you can find any in the UI which have no styling or JS interacting with them, then we can clean them up, but you'll need to list the specific instances of the tags which are unused.