[wp-trac] [WordPress Trac] #40676: wpautop adds opening & closing p tags around the opening a tag and around the closing a tag when the link contains certain flow content elements like div, h1, h2...
WordPress Trac
noreply at wordpress.org
Fri Jun 9 09:36:22 UTC 2017
#40676: wpautop adds opening & closing p tags around the opening a tag and around
the closing a tag when the link contains certain flow content elements like
div, h1, h2...
--------------------------+------------------------------
Reporter: diegocanal | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 4.7.4
Severity: major | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Comment (by diegocanal):
Replying to [comment:4 hlashbrooke]:
> As a general HTML rule (regardless of whether it's WordPress or not),
block level elements should never be wrapped inside inline elements. So a
{{{div}}} or {{{h1}}} should ''never'' be placed inside an {{{a}}} tag. I
imagine that is why {{{wpautop}}} handles things in this way, as you are
going against the general HTML standards that are accepted all over the
web.
>
> I'm not on the core team and don't have the requisite knowledge for
patching this, but I don't think it really warrants a patch as this is not
a bug, but rather an HTML standard that is being adhered to.
@hlashbrooke, have you '''fully''' read my initial comment (specially
"Note 1")? After reading "Note 1", do you still need more arguments to
make you realise that {{{div}}} and {{{h1}}} can be perfectly placed
inside an {{{a}}} element? I can give you more.
I provided arguments –referencing 3 authoritative sources– to support my
statement, you haven't done the same to support yours. Could you please
give us something more than "because I say so"?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40676#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list