Solved

how show the quotation <input type = "text"  nale = "d" value=" he said,"I love you" " >?

Posted on 2004-10-20
7
206 Views
Last Modified: 2010-04-01
IN ASP I know method server.HTMLEncode(). but in JSP??
any help?
0
Comment
Question by:laoyaobest
[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
 

Author Comment

by:laoyaobest
ID: 12362037
<html>
<head>

</head>

<body>

<input type="text" name="non_operation" value="he said,"I love you" ">

</body>
</html>
0
 
LVL 32

Accepted Solution

by:
ldbkutty earned 150 total points
ID: 12362535
0
 
LVL 27

Expert Comment

by:rrz
ID: 12365366
> but in JSP??
No, just plain java. Use the static methods in the  java.net   package.
URLEncoder.encode(inputString,"UTF-8")
URLDecoder(encodedString,"UTF-8")
0
Technology Partners: 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!

 
LVL 1

Expert Comment

by:krishnaashu
ID: 12367546


try this


<input type = 'text'  nale = 'd' value=' he said,"I love you" ' >


this will print never use "(double quotes) in html always use '(single quotes)

regds

Krish
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12367719
> never use "(double quotes) in html always use '(single quotes)

Errr...  that solves it for double quotes, but what about:

<input type = 'text'  nale = 'd' value=' he'd said,"I love you" ' >

Basically, what everyone else said is the best way forward...encode your string :-)
0
 

Expert Comment

by:Kjarrialberts
ID: 12376504
If you're talking about what I think you're talking about then you can use backslash (\) to have the html ignore the qoutation mark.

like so:

<input type="text" nale="d" value="he said \"I love you\"">

this, of course, also works with apostrophes (') or anything else.
0
 

Author Comment

by:laoyaobest
ID: 12486550
I will try it tomrrow.
I need to solve both /*value=' he said,"I love you" ' */ and  /*value=' he'd said,"I love you" ' */
So I must encode my string.
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
Part Two of the two-part Q&A series with MalwareTech.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

636 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