commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Dunning" <ted.dunn...@gmail.com>
Subject Re: isEscaped
Date Tue, 02 Sep 2008 18:47:39 GMT
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 <bielmooca@gmail.com> wrote:

> Hi,
>
> Is there any tool to verify if a String is escaped? Something like this:
>
> assertFalse( StringEscapeUtils.isHtmlEscaped("<b>text</b>") );
>
> assertTrue( StringEscapeUtils.isHtmlEscaped("&lt;b&gt;text&lt;/b&gt;")
);
>
>
> []s
> Gabriel
>



-- 
ted

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message