Solved

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

Posted on 2004-10-20
7
202 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
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!

 
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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String format issue 13 93
gZip compression filter 2 181
Set up Wildfly 10 8 444
mysql jsp example issue 32 70
Adults who share images on social media aren’t the only ones who need to worry about their privacy. Our culture’s tendency to share every move and celebration affects the privacy of our children, too.
In order to fulfill our mission of inspiring learning in the technology community, Experts Exchange is launching a Course of the Month program. Premium and Team Account members will have access to one course per month as a part of their membership, …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

756 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