I have a .NET 4.0 website, where there is some text on the login page and home page stored in SQL Server 2008. There’s a page in the site to edit both of these texts.
When I click the link to edit, they display fine in a multiline textbox. However, all line feeds are doubled when the stored procedure retrieves them from the database.
ALTER PROCEDURE [dbo].[usp_WEB_getSiteConfig]
AS
SELECT login_text, home_text FROM WEB_Site_Config
RETURN
Text area contains:
RHIOTest Home Page Text
RHIOTest Home Page Text Line 2
Displayed on home page:
RHIOTest Home Page Text
RHIOTest Home Page Text Line 2
The culprit was lines like these:
What I don’t understand is how this has been in production all this time without the customer reporting the problem…