1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / How to remove the BR added to all content blocks.

How to remove the BR added to all content blocks.

6 posts, 1 answered
  1. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    04 Jun 2012
    Link to this post
    Apparently Sitefinity adds a <br /> to the end of each of my content blocks. I can view the html of the content that I put in the content block and there is nothing. When it renders on the page it has a <br />. All of my content blocks do this.

    So I have two questions:
    1. Why?
    2. How do I remove it server-side?

    While on the topic, I have another question where it seems that other items are added to my code when it is renderd (http://www.sitefinity.com/devnet/forums/sitefinity/developing-with-sitefinity/how-to-remove-the-zero-space-character-that-repeaters-listviews-generate.aspx) Is there a generic way to get around all of these type issues? Does Sitefinity have some filter it runs everything through and adds random html entities to?
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    04 Jun 2012
    Link to this post
    Upgrade to 5.0, it's fixed...or hack it out in your version with CSS or jQuery.  Sorry if those solutions aren't optimal... :/

    ...as to why, it was probably just either a bad idea at styling or left in by accident.  Maybe they didn't test turning it off (who knows)...its in there so the social widget would appear after the content, but if you dont use the social widgets, then its still there

    I believe in 5 it's properly all hidden (until enabled) and uses divs nor a <br/> (I think)
  3. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    05 Jun 2012
    Link to this post
    Unfortunately I am already on 5.0. I did end up removing them with jQuery but it felt dirty.
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    05 Jun 2012
    Link to this post
    Which version, 5.0 or 5.0 SP1

    http://www.sitefinity.com/devnet/release-notes/details/sitefinity-5-0-sp1.aspx
    "Inserting unneeded BR tags in the end of the content items"
  5. Erik
    Erik avatar
    62 posts
    Registered:
    02 May 2011
    05 Jun 2012
    Link to this post
    I'm not sure. I assume just 5.0. Here is my meta tag:
    <meta name="Generator" content="Sitefinity 5.0.2523.0 SE" /> 
  6. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    05 Jun 2012
    Link to this post
    There we go!...that's 5.0 :)

    Ok, so backup your DB, project, and run the SP1 upgrade and you're golden

    (SP1 is 5.0.2800, couple hotfixes past that too, so probably a slightly higher version#)
    Answered
6 posts, 1 answered