• Hi, I just installed this plugin, and I really like it so far for its simplicity, and the fact that it uses the native WordPress maintenance mode function.

    However, I noticed that the HTML that is generated on the front page, is all wrapped inside a <p> tag, as follows:

    <body id="error-page">
    <p><img src="https://www.example.com/logo.png" />
    <h1>Website Under Maintenance</h1>
    This website is currently undergoing maintenance. Please check back soon.</p></body>

    This is, of course, not correct HTML. The <p> tags should be around the last line of text, but not around the IMG or H1 tags.

    What’s more, if I add a paragraph break to the text, so that there is more text in a 2nd paragraph, the output doesn’t include any new <p> tag around it. It looks like this:

    <body id="error-page">
    <p><img src="https://www.example.com/logo.png" />
    <h1>Website Under Maintenance</h1>
    This website is currently undergoing maintenance. Please check back soon.
    
    This is a new paragraph, but it won't appear as one because it doesn't have a new 'p' tag.</p></body>

    Is this something caused by your plugin, or by WordPress itself?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Lukas Juhas

    (@lukasneptun)

    Hi,
    Thank you for your message.

    This might be caused by the WYSIWYG editor. Although I might be able to improve this and I will look into this soon. I’m preparing an update (which I had no chance to do in a while) so I will revise this too.

    Thank you!

    Lukas

    Thread Starter GermanKiwi

    (@germankiwi)

    Thanks Lukas!

    I think I’d be a bit surprised if it were caused by the WYSIWYG editor, because the editor should know that it’s invalid to put <p> tabs around the outside of the and <h1> tags like that. If you were to put an image, followed by a header, followed by some paragraph text, directly into a regular WordPress page or post, the WYSIWYG editor would **not** wrap the entire thing inside a <p> tag because that would be invalid HTML.

    Anyway – I’m happy you’ll take a look at it, and also that you’re preparing an update – looking forward to it! ??

    Plugin Author Lukas Juhas

    (@lukasneptun)

    Right, that makes sense, I will definitely check this out to see what’s going on.. thank you very much for sharing this.

    Lukas

    I have similar experience:

    My backend editor show texts breaks correctly, but after save are breaks corrupted on frontpage:

    Backend view:

    View post on imgur.com

    Frontend view:

    View post on imgur.com

    I just installed and experiencing the same thing. I have an image left aligned with text next to it, but the output is putting Paragraph tags around the image, causing the text to drop below the image. Every new line of text is also being wrapped in P tags, even the H1, H2, etc

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Paragraph breaks are not correctly added to output’ is closed to new replies.