X7ROOT File Manager
Current Path:
/lib/python2.7/site-packages/pip/_vendor/html5lib/filters
lib
/
python2.7
/
site-packages
/
pip
/
_vendor
/
html5lib
/
filters
/
??
..
??
__init__.py
(0 B)
??
__init__.pyc
(160 B)
??
__init__.pyo
(160 B)
??
alphabeticalattributes.py
(621 B)
??
alphabeticalattributes.pyc
(1.36 KB)
??
alphabeticalattributes.pyo
(1.36 KB)
??
base.py
(286 B)
??
base.pyc
(1.08 KB)
??
base.pyo
(1.08 KB)
??
inject_meta_charset.py
(2.68 KB)
??
inject_meta_charset.pyc
(2.2 KB)
??
inject_meta_charset.pyo
(2.2 KB)
??
lint.py
(3.29 KB)
??
lint.pyc
(2.96 KB)
??
lint.pyo
(2.06 KB)
??
optionaltags.py
(10.29 KB)
??
optionaltags.pyc
(4.3 KB)
??
optionaltags.pyo
(4.3 KB)
??
sanitizer.py
(24.52 KB)
??
sanitizer.pyc
(25.17 KB)
??
sanitizer.pyo
(25.05 KB)
??
whitespace.py
(1.11 KB)
??
whitespace.pyc
(1.62 KB)
??
whitespace.pyo
(1.62 KB)
Editing: alphabeticalattributes.py
from __future__ import absolute_import, division, unicode_literals from . import base try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict class Filter(base.Filter): def __iter__(self): for token in base.Filter.__iter__(self): if token["type"] in ("StartTag", "EmptyTag"): attrs = OrderedDict() for name, value in sorted(token["data"].items(), key=lambda x: x[0]): attrs[name] = value token["data"] = attrs yield token
Upload File
Create Folder