| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/simplejson/tests/ |
Upload File : |
ó
ìUzMc @ sA d d l Z d d l Z d d l Z d e j f d „ ƒ YZ d S( iÿÿÿÿNt TestEncodeForHTMLc B s, e Z d „ Z d „ Z d „ Z d „ Z RS( c C s( t j j ƒ | _ t j j ƒ | _ d S( N( t
simplejsont decodert JSONDecodert encodert JSONEncoderForHTML( t self( ( sI /usr/lib/python2.7/dist-packages/simplejson/tests/test_encode_for_html.pyt setUp s c C sX | j d | j j d ƒ ƒ | j d | j j d ƒ ƒ | j d | j j d ƒ ƒ d S( Ns "\u0026"t &s "\u003c"t <s "\u003e"t >( t assertEqualR t encode( R ( ( sI /usr/lib/python2.7/dist-packages/simplejson/tests/test_encode_for_html.pyt test_basic_encode
s c C s= x6 d D]. } | j | | j j | j j | ƒ ƒ ƒ q Wd S( Ns &<>( R R t decodeR R ( R t char( ( sI /usr/lib/python2.7/dist-packages/simplejson/tests/test_encode_for_html.pyt test_basic_roundtrip s
c C sN d } | j d | j j | ƒ ƒ | j | | j j | j j | ƒ ƒ ƒ d S( Ns) </script><script>alert("gotcha")</script>sK "\u003c/script\u003e\u003cscript\u003ealert(\"gotcha\")\u003c/script\u003e"( R R R R R ( R t
bad_string( ( sI /usr/lib/python2.7/dist-packages/simplejson/tests/test_encode_for_html.pyt test_prevent_script_breakout s ( t __name__t
__module__R R
R R ( ( ( sI /usr/lib/python2.7/dist-packages/simplejson/tests/test_encode_for_html.pyR s ( t unittestt simplejson.decoderR t simplejson.encodert TestCaseR ( ( ( sI /usr/lib/python2.7/dist-packages/simplejson/tests/test_encode_for_html.pyt <module> s