Link to home
Start Free TrialLog in
Avatar of mehdi
mehdi

asked on

Just a quicky ! ooh err...

Im calling a finction.. that does stuff.. not written by myself.

Im outputting its resultant string to the browser.. (goes through a few steps to get there, but this is not important)

anyway if i use the string <br /> .. it gets encoded and is output as &lt;br /&gt;

Q: Why are my bracketty things getting encoded, and how do I stop them !

~~~~~~~~~~~~~~~~~~~~~~~~~~~
The secret lemonade drinker
Avatar of Ovi
Ovi

Perhaps you meen </br> and not <br/>. It gets this output because is not a valid html tag (is interpreted in this maneer by the browser) and the parser will replace "<" with &lt (lower than) and ">" with &gt (greather than). Your html page will display <br/> in the end and not the whished carriage return.
Avatar of mehdi

ASKER

nope.  <br /> is not incorrect..  It is in fact the correct form [the XML complient version]

In anycase, i tried using <br> also, the same thing happened.
Avatar of mehdi

ASKER

So, How do I unencode a URL encoded String ? grrr!!
ASKER CERTIFIED SOLUTION
Avatar of Ovi
Ovi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
java.net.URLDecoder.decode(your string goes here); for decoding.
Both are static methods.
>> (goes through a few steps to get there, but this
is not important)

I think it's quite important. When does the change occur?
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


[points to Ovi]


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.