views:

94

answers:

2

Hi All,

I have a URL string in the following format.

http://myserver.com/_layouts/feed.aspx?xsl=4&web=%2F&page=dda3fd10-c776-4d69-8c55-2f1c74b343e2&wp=476f174a-82df-4611-a3df-e13255d97533

I want to replace & with & in the above URL. My result should be:

http://myserver.com/_layouts/feed.aspx?xsl=4&web=%2F&page=dda3fd10-c776-4d69-8c55-2f1c74b343e2&wp=476f174a-82df-4611-a3df-e13255d97533

Can someone post me the code to get this done?

i changed the code like this. but not working

if (name.equalsIgnoreCase(LINK))
{
            Log.v(TAG,"link link: "+property.getFirstChild().getNodeValue().replace("&","&"));
            message.setLink(property.getFirstChild().getNodeValue().replace("&","&"));           
        }

Thanks

+1  A: 

How about:

private String decode(String url)
{
   return url.replace("&", "&");
}
mbaird
A: 

String.replace(target, replacement)

Jonathan Feinberg
Praveen Chandrasekaran