Saving SF Generic Content places newline character after the text
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
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
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