-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<audio> inside <p> causes an empty <p> #121
Comments
I'm not sure that the tag p can contain audio tags... is it true? |
I'm not sure either. My use case is with TinyMCE, which actually adds p tags around audio tags: https://jsfiddle.net/z35qy9h0/1/ A random SO thread: http://stackoverflow.com/questions/9852312/list-of-html5-elements-that-can-be-nested-inside-p-element Also testing the aforementioned HTML in Firefox and Chrome results in the audio element staying inside the p element, when looking at the DOM, whereas if there was a div inside a p element, those browsers would render the div outside the p element. Also, this gives no validation errors with the string
|
Is turning off autop not a better option than adding edge cases to other software? |
This one is a little more complicated once I started looking at the specs...
This exact line doesn't show up in the HTML5 spec. The HTML5 spec does say,
Phrasing content does contain audio tags. So, this is a bug. While I've yet to track it completely, I did find that it's in the parser. The next step is to start looking at how p auto-closing works. |
#142 should fix this |
I'm using version 2.2.2 with PHP PHP 5.4.45.
This code
results in this HTML
Running this in Chrome says that
<audio>
is an inline element (at least in this context):The text was updated successfully, but these errors were encountered: