Solved

Just a quicky ! ooh err...

Posted on 2001-07-06
7
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 9

Expert Comment

by:Ovi
ID: 6258915
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
ID: 6258958
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
ID: 6258962
So, How do I unencode a URL encoded String ? grrr!!
0
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 
LVL 9

Accepted Solution

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

Expert Comment

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

Expert Comment

by:ia_ia_ia_1
ID: 6483205
>> (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
ID: 9017451
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

691 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