• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

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
0
mehdi
Asked:
mehdi
1 Solution
 
OviCommented:
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.
0
 
mehdiAuthor Commented:
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.
0
 
mehdiAuthor Commented:
So, How do I unencode a URL encoded String ? grrr!!
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
OviCommented:
java.net.URLEncoder.encode(your string goes here);
0
 
OviCommented:
java.net.URLDecoder.decode(your string goes here); for decoding.
Both are static methods.
0
 
ia_ia_ia_1Commented:
>> (goes through a few steps to get there, but this
is not important)

I think it's quite important. When does the change occur?
0
 
sudhakar_koundinyaCommented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now