Click to See Complete Forum and Search --> : Escaping Issues


Slickwilly9
05-30-2008, 01:40 PM
I have the following string -

str_path = "\t<li class=\"directory collapsed\"><a href=\"#\" rel=\"" + dir + di_child.Name + "/\">" + di_child.Name + "</a></li>\n";

The "/\">" is where the issue lies. I need to change the / to a \, however, whenever I try I seem to break the string being create. Any help is appreciated. Thanks.

Seth

chazzy
05-31-2008, 08:27 PM
the end HTML you're trying to produce is supposed to look like this, right:

<li class="directory collapsed"><a href="#" rel="some value/">some name</a></li>

Right?

if so, your best bet is to create a var with the value, something like this:


some_var = dir + di_child.Name + "/";


and then append that to your string.