When I insert this text:


1 https://example.com/source-1

[2] https://example.com/source-2

[3] https://example.com/source-3

WP doesn't respect those newlines.

If I remove the texts in [] it renders correctly. I assume WP is parsing it as shortcode and gets mixed up. Is this a possibility? How can I fix this? It's using the Classic Editor.

-- Edit --

OK the problem actually is that it's generating empty P tags instead of properly wrapping those lines inside Paragraphs. enter image description here

  • * Which editor are you using? * Are you copying and pasting plain text or from a rich text source? I'm not able to reproduce it in block editor, and each line goes as a paragraph. Selecting classic block and pasting gives same result. Removing the double newline makes the lines closer (one paragraph), but still shows on a line by itself. Please state exactly how you do it. – Knut Sparhell Aug 13 '19 at 19:00
  • I was just editing the question. It's using the Classic version, not Gutenberg. – Nacho Aug 13 '19 at 19:02
  • I made sure no weird HTML is being pasted. I could reproduce it by just typing in the editor. – Nacho Aug 13 '19 at 19:06
  • OK, I just used another blog instance with the classic editor and couldn't repro, so it must be something within functions or plugins specific to this installation. – Nacho Aug 13 '19 at 19:08
  • Not able to reproduce in classic editor either. – Knut Sparhell Aug 13 '19 at 19:08

I found the problem and it was Shortcodes Ultimate malforming the HTML in that case: https://es.wordpress.org/plugins/shortcodes-ultimate/

I'm getting in touch with their developers.

  • It seems only this wasn't the cause either. Some legacy shortcodes that add empty paragraphs is the culprit. – Nacho Aug 15 '19 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.