ASF Bugzilla – Attachment 19112 Details for
Bug 34875
XML and HTMLLayout do not always escape special characters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
TestCase for org.apache.log4j.helpers.Transform.sanitize4XML()
TransformTest.java (text/plain), 842 bytes, created by
Kay Abendroth
on 2006-11-10 06:34:15 UTC
(
hide
)
Description:
TestCase for org.apache.log4j.helpers.Transform.sanitize4XML()
Filename:
MIME Type:
Creator:
Kay Abendroth
Created:
2006-11-10 06:34:15 UTC
Size:
842 bytes
patch
obsolete
>package org.apache.log4j.test; > > >import junit.framework.TestCase; > >import org.apache.log4j.helpers.Transform; > > >public class TransformTest extends TestCase { > > public void testSanitize4XML() { > > String input1= "Here is a &."; > String input2= "And a >,"; > String input3= "a <,"; > String input4= "a \","; > String input5= "finally: '"; > String nullify= null; > String zero= ""; > > assertEquals(Transform.sanitize4XML(input1), "Here is a &."); > assertEquals(Transform.sanitize4XML(input2), "And a >,"); > assertEquals(Transform.sanitize4XML(input3), "a <,"); > assertEquals(Transform.sanitize4XML(input4), "a ","); > assertEquals(Transform.sanitize4XML(input5), "finally: '"); > assertEquals(Transform.sanitize4XML(nullify), null); > assertEquals(Transform.sanitize4XML(zero), ""); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 34875
:
19109
|
19110
| 19112