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

Forums / Bugs & Issues / Saving SF Generic Content places newline character after the text

Saving SF Generic Content places newline character after the text

3 posts, 0 answered
  1. Scott
    Scott avatar
    11 posts
    Registered:
    06 Aug 2012
    13 Jul 2011
    Link to this post
    Hello, we are storing many things in generic content to be used throughout the site. This works well, but we ran into problems when trying to store email subjects. The reason for this is that when you save generic content in Sitefinity, it adds a newline character to the end of the content. Then when we use the System.Net.MailMessage class to generate a message, we get an error on the MailMessage.Subject setter. The setter does not allow newline characters. 

    We are writing a custom MailMessage class that strips out these characters for now, but it would be nice if SF did not add that newline character to the end and simply stored the content as entered. Let me know if something can be done.

    Thank you,

    Scott
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    17 Aug 2017
    15 Jul 2011
    Link to this post
    Hi Scott,

    When pasting in the content block the text will be presented as copied. If you have copied and HTML text which includes <a> <div> <h1> they will be added to the content block as they are.
    For a possible solution to your problem expand more formatting options and use the stripper tool to strip the formatting that is problematic. If this does not help please provide me an example of copied text that will demonstrate the problem or where should I copy from to reproduce the problem. Currently copying while e-mails puts the past line in <p> and closes it.

    Regards,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Scott
    Scott avatar
    11 posts
    Registered:
    06 Aug 2012
    15 Jul 2011
    Link to this post
    Stanislav,

    Thank you as usual for the quick response. I've forwarded this to another developer to test and I will get back with you next week.

    Thank you,

    Scott

3 posts, 0 answered