ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyc

�
�2{Yc@`s�ddlmZmZmZddlZddlmZmZddlm	Z	ddl
mZdefd��YZ
d	e	e
fd
��YZdS(i(tabsolute_importtdivisiontunicode_literalsN(tescapetunescapei(t
HTMLTokenizer(t
tokenTypestHTMLSanitizerMixinc�B`s+eZdZddddddddd	d
ddd
ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcgcZdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~gZddd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�g#Zdd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d(d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d7d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dddddddddd	d
ddd
dddQdddddddddd�dddddddd d!d"d#d$d%d&g�Zd'd�d(d(d(d)d*d+d,d-d.d/d0d1d2d3d�d�d4d5d6d7d8d8d9d:d;d<d<d<d=d>d
d?d@dAdBdCd$d$dDdEdFdGdHg-ZdIdJdKdLdMdNdOdPdQdRdSdTdUdVd�dWd�dXdYdZd[d\d]d^d_d-d`d�dadbdcdddedfdgdhdidjdkdldmdndodpdqd�drdsd�dtdudvdwdxd�dydzd{d|d}d~dd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�dd�d�d�dd�d�d�d�d�d�d�d�d�d�d�d$d�d�d�d�d�d�d�dDd�dEd�dFd�d&d�dGdHd�d�d�d�g�Zd�ddd�d�d�dDd�gZ	dWd�d�dad�d�d{dzdyd�d�gZ
d�dd�d�d�d�d�d�d�d�d�d�d�d�d�gZd�d�d�d�d�d�d�d�d�d�d�d�d-d�d�d'dddedgdhdid�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d!d�d$g.Zd�d�d�d�d�d�d�d�d�dd�d�d�d�d�d�d�d�d�d�d�d�d~ddd�dddddddd	d
ddd
dg'Z
dadbdcd�d�d�d�d�gZddddddddddddddddddd d!d"d#gZeeeZeeeZeZe
ZeZeZd$�Zd%�Zd&�Zd'�ZRS((uA sanitization of XHTML+MathML+SVG and of inline style attributes.uauabbruacronymuaddressuareauarticleuasideuaudioububigu
blockquoteubrubuttonucanvasucaptionucenteruciteucodeucolucolgroupucommandudatagridudatalistuddudeludetailsudfnudialogudirudivudludtuemuevent-sourceufieldsetu
figcaptionufigureufooterufontuformuheaderuh1uh2uh3uh4uh5uh6uhruiuimguinputuinsukeygenukbdulabelulegenduliumumapumenuumeterumulticolunavunextiduoluoutputuoptgroupuoptionupupreuprogressuqususampusectionuselectusmallusoundusourceuspaceruspanustrikeustrongusubusuputableutbodyutdutextareautimeutfootuthutheadutruttuuuuluvaruvideoumactionumathumerrorumfracumiu
mmultiscriptsumnumoumoverumpaddedumphantomumprescriptsumrootumrowumspaceumsqrtumstyleumsubumsubsupumsupumtableumtdumtextumtrumunderu
munderoverunoneuanimateuanimateColoru
animateMotionuanimateTransformuclipPathucircleudefsudescuellipseu	font-faceufont-face-nameu
font-face-srcuguglyphuhkernulinearGradientulineumarkerumetadatau
missing-glyphumpathupathupolygonupolylineuradialGradienturectusetustopusvguswitchutextutitleutspanuuseuacceptuaccept-charsetu	accesskeyuactionualignualtuautocompleteu	autofocusuaxisu
backgroundubalanceubgcolorubgpropertiesuborderubordercolorubordercolordarkubordercolorlightu
bottompaddingucellpaddingucellspacinguchu	challengeucharucharoffuchoffucharsetucheckeduclassuclearucolorucolsucolspanucompactucontenteditableucontrolsucoordsudataudatafldudatapagesizeudatasrcudatetimeudefaultudelayudisabledu	draggableudynsrcuenctypeuendufaceuforuframeu
galleryimgugutteruheadersuheightu	hidefocusuhiddenuhighuhrefuhreflanguhspaceuiconuidu	inputmodeuismapukeytypeuleftspacingulangulistulongdesculoopu	loopcountuloopendu	loopstartulowulowsrcumaxu	maxlengthumediaumethoduminumultipleunameunohrefunoshadeunowrapuopenuoptimumupatternupingu
point-sizeuposterupqgupreloadupromptu
radiogroupureadonlyurelu
repeat-maxu
repeat-minureplaceurequiredurevurightspacingurowsurowspanurulesuscopeuselectedushapeusizeusrcustartustepustyleusummaryusuppressutabindexutargetutemplateu
toppaddingutypeuunselectableuusemapuurnuvalignuvalueuvariableuvolumeuvspaceuvrmluwidthuwrapuxml:langu
actiontypeucolumnalignucolumnlinesu
columnspacingu
columnspanudepthudisplayudisplaystyleuequalcolumnsu	equalrowsufenceu	fontstyleu
fontweightu
linethicknessulspaceumathbackgroundu	mathcolorumathvariantumaxsizeuminsizeuotherurowalignurowlinesu
rowspacingurspaceuscriptlevelu	selectionu	separatorustretchyu
xlink:hrefu
xlink:showu
xlink:typeuxmlnsuxmlns:xlinku
accent-heightu
accumulateuadditiveu
alphabeticuarabic-formuascentu
attributeNameu
attributeTypeubaseProfileubboxubeginubyucalcModeu
cap-heightu	clip-pathucolor-renderingucontentucxucyududxudyudescentudurufillufill-opacityu	fill-ruleufont-familyu	font-sizeufont-stretchu
font-styleufont-variantufont-weightufromufxufyug1ug2u
glyph-nameu
gradientUnitsuhanginguhoriz-adv-xuhoriz-origin-xuideographicuku	keyPointsu
keySplinesukeyTimesu
marker-endu
marker-midumarker-startumarkerHeightumarkerUnitsumarkerWidthumathematicaluoffsetuopacityuorientuoriginuoverline-positionuoverline-thicknessupanose-1u
pathLengthupointsupreserveAspectRatioururefXurefYurepeatCountu	repeatDururequiredExtensionsurequiredFeaturesurestarturotateurxuryuslopeustemhustemvu
stop-colorustop-opacityustrikethrough-positionustrikethrough-thicknessustrokeustroke-dasharrayustroke-dashoffsetustroke-linecapustroke-linejoinustroke-miterlimitustroke-opacityustroke-widthusystemLanguageutext-anchorutou	transformuu1uu2uunderline-positionuunderline-thicknessuunicodeu
unicode-rangeuunits-per-emuvaluesuversionuviewBoxu
visibilityuwidthsuxux-heightux1ux2u
xlink:actuateu
xlink:arcroleu
xlink:roleuxlink:titleuxml:baseu	xml:spaceuyuy1uy2u
zoomAndPanu
color-profileucursorufilterumaskualtGlyphufeImageutextpathutrefuazimuthubackground-coloruborder-bottom-coloruborder-collapseuborder-coloruborder-left-coloruborder-right-coloruborder-top-coloru	directionu	elevationufloatuletter-spacinguline-heightuoverflowupauseupause-afterupause-beforeupitchupitch-rangeurichnessuspeakuspeak-headeru
speak-numeraluspeak-punctuationuspeech-rateustressu
text-alignutext-decorationutext-indentuunicode-bidiuvertical-alignuvoice-familyuwhite-spaceuautouaquaublackublockublueuboldubothubottomubrownucollapseudashedudottedufuchsiaugrayugreenu
!importantuitaliculeftulimeumaroonumediumunavyunormaluoliveupointerupurpleuredurightusolidusilverutealutoputransparentu	underlineuwhiteuyellowued2kuftpuhttpuhttpsuircumailtounewsugopherunntputelnetuwebcaluxmppucalltoufeeduaimursyncutagusshusftpurtspuafscC`s�|d}|ttj��kr/t|}n|tdtdtdfkr�|d|jkrs|j||�S|j||�Sn|tdkr�n|SdS(NutypeuStartTaguEndTaguEmptyTagunameuComment(tlistRtkeystallowed_elementst
allowed_tokentdisallowed_token(tselfttokent
token_type((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pytsanitize_token�s

cC`s�d|kr�tg|dddd�D]'\}}||jkr'||f^q'�}x�|jD]�}||kryqantjddt||��j�}|jdd�}tjd|�ra|j	d�d|j
kra||=qaqaWxC|jD]8}||kr�tjd	d
t||��||<q�q�W|d|jkrqd|krqtj
d
|d�rq|d=nd|kr�|j|d�|d<ngt|j��D]\}}||g^q�|d<n|S(Nudatai����u
[`- - \s]+uu�u^[a-z0-9][-+.a-z0-9]*:u:iuurl\s*\(\s*[^#\s][^)]+?\)u unameu
xlink:hrefu^\s*[^#\s].*ustyle(tdicttallowed_attributestattr_val_is_uritretsubRtlowertreplacetmatchtsplittallowed_protocolstsvg_attr_val_allows_reftsvg_allow_local_hreftsearchtsanitize_cssRtitems(R
RRtnametvaltattrstattrt
val_unescaped((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyR�s6!$	

8cC`s|tdkr%d|d|d<ns|dr�djg|dD]"\}}d|t|�f^q@�}d|d|f|d<nd|d|d<|jd	�r�|dd
 d|d<n|dttj��kr�d
|d<ntd
|d<|d=|S(NuEndTagu</%s>unameudatauu %s="%s"u<%s%s>u<%s>uselfClosingi����u/>utypeu
Characters(RtjoinRtgetRR	(R
RRtktvR"((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyR�s
<
cC`sctjd�jd|�}tjd|�s1dStjd|�sGdSg}xtjd|�D]�\}}|sxq`n|j�|jkr�|j|d|d�q`|jd	�d
j�dkr!x�|j�D],}||j	kr�tjd|�r�Pq�q�W|j|d|d�q`|j�|j
kr`|j|d|d�q`q`Wdj|�S(Nuurl\s*\(\s*[^\s)]+?\s*\)\s*u u@^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$uu ^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$u([-\w]+)\s*:\s*([^:;]*)u: u;u-iu
backgrounduborderumarginupaddingu\^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$(u
backgrounduborderumarginupadding(RtcompileRRtfindallRtallowed_css_propertiestappendRtacceptable_css_keywordstallowed_svg_propertiesR%(R
tstyletcleantproptvaluetkeyword((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyR�s*	 (t__name__t
__module__t__doc__tacceptable_elementstmathml_elementstsvg_elementstacceptable_attributestmathml_attributestsvg_attributesRRRtacceptable_css_propertiesR-tacceptable_svg_propertiestacceptable_protocolsR
RR+tallowed_css_keywordsR.RRRRR(((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyR
s						
			t
HTMLSanitizercB`s,eZdeeeedd�Zd�ZRS(c
C`s)tj|||||||d|�dS(Ntparser(Rt__init__(R
tstreamtencodingt	parseMetat
useChardettlowercaseElementNametlowercaseAttrNameRB((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyRCscc`s;x4tj|�D]#}|j|�}|r|VqqWdS(N(Rt__iter__R(R
R((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyRJsN(R4R5tNonetTruetFalseRCRJ(((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyRAs	(t
__future__RRRRtxml.sax.saxutilsRRt	tokenizerRt	constantsRtobjectRRA(((sO/opt/alt/python33/lib/python3.3/site-packages/pip/_vendor/html5lib/sanitizer.pyt<module>s�

Zerion Mini Shell 1.0