Closed jpfleury closed 8 years ago
Strange, I'm just getting a <p><img...
. Does the same happen on the admin-side page preview?
I found the problem. It has nothing to do with images. It's just that I was testing with pages containing only an image.
The problem is that the entire content is wrapped inside a p
. Example:
<div class="list-blog-padding">
<p><p>Paragraph 1</p>
<p>Here's an image: <img style="" src="/grav/images/f/...-image3x.jpeg" srcset="/grav/images/f/...-image3x.jpeg 250w, /grav/images/1/...-image3x.jpeg 750w, /grav/images/e/...-image3x.jpeg 500w" sizes="100vw" /></p>
<p>Another paragraph</p></p>
<p class="prev-next">
<a class="button" href="/grav/blog/article">Previous Post <i class="fa fa-chevron-right"></i></a>
</p>
</div>
See, we have:
<p>
<p>Paragraph 1</p>
<p>Here's an image: <img ... /></p>
<p>Another paragraph</p>
</p>
Which theme are you using?
Antimatter (from the blog skeleton).
Right so in the Antimatter theme (and also checked Bootstrap, it's the same) we wrap {{ page.content }}
in a p
tag. @rhukster do you recall the reason for it? All other {{ page.content }}
mentions in other templates are not wrapped in a paragraph. I tried removing, all seems fine. Can we drop the p
wrap?
I can see no reason for having that
tag, yes i think we can remove it.
Config: Grav v0.9.43 and Admin Panel v.0.6.0
When adding
image@3x.jpg
in the Page Media and inserting it, the Markdown code added is:The HTML result is invalid (paragraph inside paragraph):