On Wed, Sep 3, 2008 at 11:33 AM, Garrett Smith <[EMAIL PROTECTED]>wrote:
> This example:
>
> >> assertTrue( StringEscapeUtils.isHtmlEscaped("text")
> );
> >
> - is flawed.
>
> The flaw is searching for unescaped entities, not searching for no
> unescaped entities.
> ...
You make some goo
als(StringEscapeUtils.unescapeHtml(value))) {
>...
> }
>
Method unescapeHTML converts escaped entities to the unescaped character.
That would not work.
Because:-
boolean isEscaped;
String value = "Use this HTML: '<b>text</b>'";
isEscaped =
On Tue, Sep 2, 2008 at 7:28 PM, Gabriel Reis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there any tool to verify if a String is escaped? Something like this:
>
> assertFalse( StringEscapeUtils.isHtmlEscaped("text") );
>
> assertTrue( StringEscapeUtils.isHtmlEscaped("text") );
Perhaps one way t
What is the end goal? It seems you might end up taking more time trying to
find out if it's HTML escaped then just coding for it on a usage basis.
On Tue, Sep 2, 2008 at 1:28 PM, Gabriel Reis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there any tool to verify if a String is escaped? Something like t
here are many entities. HTML Entities, XML Entities.
isEscaped would have to account for a negation of all of unescaped entities.
not: < | ' | " | & | \u00a0 should suffice reasonably well. The last
one is nbsp or #160/
Garrett
> On Tue, Sep 2, 2008 at 6:32 PM, F. Andy Seidl
>
gt;'")
>
> -- fas
>
> F. Andy Seidl
> MyST Technology Partners, Inc.
>
> -Original Message-
> From: Ted Dunning [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 02, 2008 2:48 PM
> To: Commons Users List
> Subject: Re: isEscaped
>
> Isn't
e this HTML: '<b>text</b>'")
-- fas
F. Andy Seidl
MyST Technology Partners, Inc.
-Original Message-
From: Ted Dunning [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2008 2:48 PM
To: Commons Users List
Subject: Re: isEscaped
Isn't this a pretty
Isn't this a pretty simple regex? Just look for <'s and &'s without entity
syntax.
On Tue, Sep 2, 2008 at 11:28 AM, Gabriel Reis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there any tool to verify if a String is escaped? Something like this:
>
> assertFalse( StringEscapeUtils.isHtmlEscaped("text")
Hi,
Is there any tool to verify if a String is escaped? Something like this:
assertFalse( StringEscapeUtils.isHtmlEscaped("text") );
assertTrue( StringEscapeUtils.isHtmlEscaped("text") );
[]s
Gabriel