Solved

Just a quicky ! ooh err...

Posted on 2001-07-06
7
198 Views
Last Modified: 2010-04-16
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
Comment
Question by:mehdi
7 Comments
 
LVL 9

Expert Comment

by:Ovi
Comment Utility
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
 
LVL 1

Author Comment

by:mehdi
Comment Utility
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
 
LVL 1

Author Comment

by:mehdi
Comment Utility
So, How do I unencode a URL encoded String ? grrr!!
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 9

Accepted Solution

by:
Ovi earned 30 total points
Comment Utility
java.net.URLEncoder.encode(your string goes here);
0
 
LVL 9

Expert Comment

by:Ovi
Comment Utility
java.net.URLDecoder.decode(your string goes here); for decoding.
Both are static methods.
0
 
LVL 2

Expert Comment

by:ia_ia_ia_1
Comment Utility
>> (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
 
LVL 14

Expert Comment

by:sudhakar_koundinya
Comment Utility
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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
count11 challenge 6 47
word0 challenge 4 52
eclipse java  build path 6 16
Cipher Configuration on Apache HTTPD 4 15
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now