Illegal characters exception occurs while parsing the bootstrap.css style

  • Thread starter Thread starter Kanniyappan Panneerselvam
  • Start date Start date
K

Kanniyappan Panneerselvam

Guest
I have a custom control in WF platform which helps to renders the Hyper Text Markup Language (HTML). Its functionality is similar to a web browser. We have facing the "System.ArgumentException: 'Illegal characters in path.'" exception in custom control while parsing the bootstrap.css style in it. It mainly occurs while parsing the background-image from css to the control.

BootStrap.css

background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'><path stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");


C#


// Error occurred while parsing bootstrap css file

customControl.LoadCSS(GetFilesLocation() + @"\bootstrap.css");


static string GetFilesLocation()
{
string path;
path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
path = path.Replace("file:\\", "");
path = path + "\\webApp\\";
return path;
}



Please help me how to resolve this issue?

Continue reading...
 
Back
Top