mbevins
Posts: 9
Joined: Thu Nov 03, 2011 12:46 pm

Adding & to Properties

I have a property called CONNECTIONSTRING that gets passed when the msi is executed. When this property is passed to it, something is changing the property. I am passing this string:

metadata=res://*/Entities.FitnessManager.csdl|res://*/Entities.FitnessManager.ssdl|res://*/Entities.FitnessManager.msl;provider=System.Data.SqlClient;provider connection string="Data Source=localhost;Initial Catalog=MyDB;Integrated Security=SSPI;multipleactiveresultsets=True;App=EntityFramework"

The string that gets added to my web.config is:


metadata=res://*/Entities.FitnessManager.csdl|res://*/Entities.FitnessManager.ssdl|res://*/Entities.FitnessManager.msl;provider=System.Data.SqlClient;provider connection string="Data Source=localhost;Initial Catalog=MyDB;Integrated Security=SSPI;multipleactiveresultsets=True;App=EntityFramework"


Which is no longer a valid connection string. Why are the &s getting added and how can I prevent this?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Adding & to Properties

Hello,

According to the XML standards, our XML Updates features automatically escapes the following characters:
& to &
< to <
> to >
" to "
' to &apos;

A standard XML parser should translate these XML entity escape sequences to their corresponding characters. Here's a related article you can follow.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”