{"id":521,"date":"2009-11-30T08:00:07","date_gmt":"2009-11-30T07:00:07","guid":{"rendered":"http:\/\/www.razumny.no\/blog\/?p=521"},"modified":"2012-06-02T21:46:09","modified_gmt":"2012-06-02T19:46:09","slug":"wordpress-and-the-mystery-of-the-disappearing-line-breaks","status":"publish","type":"post","link":"https:\/\/www.razumny.no\/?p=521","title":{"rendered":"WordPress and the Mystery of the Disappearing Line Breaks"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.razumny.no\/images\/blog\/WordPressLogo.png\" align=\"right\">I&#8217;ve been running my blog on Wordpres for over a month now, and I am mostly happy with what I&#8217;m seeing. It does most of what I want it to do natively. As for what it doesn&#8217;t do natively, there is usually a plugin to do that for you.<br \/>\n&nbsp;<br \/>\nThe only thing I&#8217;ve as yet been unable to make it do satisfactorily, is line breaks. TinyMCE, the text editor in WordPress, executes a back-end filtering process every time you switch from Visual to HTML and back, as well as whenever you save your posts. This filtering process, for some reason, filters out both <code>&lt;br&gt;<\/code>, <code>&lt;p&gt;<\/code> and <code>&lt;\/p&gt;<\/code>.<br \/>\n&nbsp;<br \/>\nI originally tried to resolve this by installing a plugin called <a href=\"http:\/\/wordpress.org\/extend\/plugins\/tinymce-advanced\/\" target=_blank>TinyMCE Advanced<\/a>, which worked pretty nicely, except that, when I was typing up this post, it filtered so that my code examples above were converted so that they became actual HTML tags.<br \/>\n&nbsp;<br \/>\nI then installed another plugin called <a href=\"http:\/\/wordpress.org\/extend\/plugins\/tinymce-valid-elements\/\" target=_blank>TinyMCE Valid Elements<\/a>, in which I defined <code>&lt;br&gt;<\/code> as a valid element. Sure enough, TinyMCE no longer filtered out the tag, but it wasn&#8217;t parsed either.<br \/>\n&nbsp;<br \/>\nI will continue to try to fix the problem. In the meantime, I have a workaround. By adding <code>&amp;nbsp;<\/code> wherever I want a break, I get my line breaks.<br \/>\n&nbsp;<br \/>\n<i>Note: Comments disabled due to massive amounts of comment spam<\/i><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been running my blog on Wordpres for over a month now, and I am mostly happy with what I&#8217;m seeing. It does most of what I want it to do natively. As for what it doesn&#8217;t do natively, there is usually a plugin to do that for you. &nbsp; The only thing I&#8217;ve as [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[503],"tags":[927,530,514,953],"class_list":["post-521","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-hack","tag-line-break","tag-tags","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p2ukSU-8p","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1025,"url":"https:\/\/www.razumny.no\/?p=1025","url_meta":{"origin":521,"position":0},"title":"The most useful WordPress plugin ever","author":"Aleksander Nordgarden-R\u00f8dner","date":"12\/04\/2010","format":false,"excerpt":"Like most bloggers, I see a fair share of comment spam. This used to be a problem, as I didn't have a good way of filtering them out, meaning I set the comment option to Approve all. After I moved from Blogger to Wordpress, I was tipped off about a\u2026","rel":"","context":"In &quot;Wordpress&quot;","block_context":{"text":"Wordpress","link":"https:\/\/www.razumny.no\/?cat=503"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1269,"url":"https:\/\/www.razumny.no\/?p=1269","url_meta":{"origin":521,"position":1},"title":"My number one wanted feature on the iPad","author":"Aleksander Nordgarden-R\u00f8dner","date":"03\/01\/2011","format":false,"excerpt":"As should be obvious by now, I love my iPad, and bring it with me most everywhere I go. I use it for work and play, planning and doodling in equal amounts. It has more or less supplanted my netbook as my default unit for web browsing, emailand many other\u2026","rel":"","context":"In &quot;File management&quot;","block_context":{"text":"File management","link":"https:\/\/www.razumny.no\/?cat=523"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4603,"url":"https:\/\/www.razumny.no\/?p=4603","url_meta":{"origin":521,"position":2},"title":"Enabling two-factor authentication on WordPress","author":"Aleksander Nordgarden-R\u00f8dner","date":"14\/05\/2018","format":false,"excerpt":"For the past two years, I've been enabling two-factor authentication (2FA) wherever I can, and particularly on services where I want to ensure that my data is as secure as possible. Back in April, I added 2FA to this site. As this was the first time I'd ever set something\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3939,"url":"https:\/\/www.razumny.no\/?p=3939","url_meta":{"origin":521,"position":3},"title":"Transferring notes from GMail to Google Keep","author":"Aleksander Nordgarden-R\u00f8dner","date":"06\/02\/2017","format":false,"excerpt":"While I have a number of software tools that I use and like, I do\u00a0like trying out alternatives. Sometimes the alternatives supercede the tool I used to use, sometimes I revert to the old tool, and sometimes I go forward using both. Back in November,\u00a0I started using Google Keep, wanting\u2026","rel":"","context":"In &quot;How To&quot;","block_context":{"text":"How To","link":"https:\/\/www.razumny.no\/?cat=615"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2747,"url":"https:\/\/www.razumny.no\/?p=2747","url_meta":{"origin":521,"position":4},"title":"Unable to uninstall Citrix Receiver or Online Plugin","author":"Aleksander Nordgarden-R\u00f8dner","date":"19\/01\/2015","format":false,"excerpt":"From time to time, users call in, reporting problems\u00a0opening applications or desktops in Citrix. One of the many\u00a0items in a support technician's bag of tricks, is the old uninstall and reinstall routine. There are many reasons why this can be a good idea,\u00a0among them that removing legacy applications that have\u2026","rel":"","context":"In &quot;Citrix&quot;","block_context":{"text":"Citrix","link":"https:\/\/www.razumny.no\/?cat=95"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1525,"url":"https:\/\/www.razumny.no\/?p=1525","url_meta":{"origin":521,"position":5},"title":"The FotoWeb Office Plugin supports placing of multiple placeholder boxes in PowerPoint","author":"Aleksander Nordgarden-R\u00f8dner","date":"04\/06\/2012","format":false,"excerpt":"When creating a layout in Powerpoint, pay attention to the sequence in which you place placeholders. The Office Plugin will place images in picture placeholders first, in the order they were placed in the document. \u00a0 Second, it will place images in Content placeholders, again, in the order they were\u2026","rel":"","context":"In &quot;FotoWare&quot;","block_context":{"text":"FotoWare","link":"https:\/\/www.razumny.no\/?cat=631"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=521"}],"version-history":[{"count":16,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/521\/revisions"}],"predecessor-version":[{"id":1641,"href":"https:\/\/www.razumny.no\/index.php?rest_route=\/wp\/v2\/posts\/521\/revisions\/1641"}],"wp:attachment":[{"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.razumny.no\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}