• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: toHTMLString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: toHTMLString


  • Subject: Re: toHTMLString
  • From: Mike Schrag <email@hidden>
  • Date: Thu, 23 Jun 2005 14:35:29 -0400

stringByEscapingHTMLString is a static method on WOMessage, so you need to:

import com.webobjects.appserver.WOMessage;

...

String unescapedString = "<Test>";
String escapedString = WOMessage.stringByEscapingString (unescapedString);


...

On Jun 23, 2005, at 2:03 PM, Dev WO wrote:

Humm,
I cannot appendToResponse as the resulting string is used somewhere else in the application and not sent back to the browser.
I need to use it in my framework (to extend an already existing class) to make the new string available as if it was an attribute of the parent class:
class Source
(has href(), title())
class SourceEX extends source
has string link which should be "<a href="href()ESCAPED" title="title()">


I tried importing appserver:
import com.webobjects.appserver.*;

then either:
stringByEscapingHTMLString(href())
href().stringByEscapingHTMLString()

but always complaining about:
SourceEX.java:24: cannot resolve symbol
symbol  : method stringByEscapingHTMLString (java.lang.String)

...


On WOMessage there is a static method String stringByEscapingHTMLString(String) that is used by WO to escape HTML. If you are just writing out to the response, you can use woresponse.appendContentHTMLString(String) and it will call that method and just write the response directly out.

ms



_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: toHTMLString [SOLVED]
      • From: Dev WO <email@hidden>
References: 
 >toHTMLString (From: Dev WO <email@hidden>)
 >Re: toHTMLString (From: Dev WO <email@hidden>)
 >Re: toHTMLString (From: Mike Schrag <email@hidden>)
 >Re: toHTMLString (From: Dev WO <email@hidden>)

  • Prev by Date: Re: Using Old EOModeler with WO 5.3/xCode 2.1?
  • Next by Date: Re: EOL for WebObjects 5.2
  • Previous by thread: Re: toHTMLString
  • Next by thread: Re: toHTMLString [SOLVED]
  • Index(es):
    • Date
    • Thread