Saving SF Generic Content places newline character after the

Posted by Community Admin on 04-Aug-2018 15:30

Saving SF Generic Content places newline character after the text

All Replies

Posted by Community Admin on 13-Jul-2011 00:00

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

Posted by Community Admin on 15-Jul-2011 00:00

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

Posted by Community Admin on 15-Jul-2011 00:00

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

This thread is closed