kr.motd.maven.sphinx.dist.markupsafe.__init__$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1) f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ ?
markupsafe
~~~~~~~~~~
Implements a Markup string.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
org/python/core/PyString fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString;
org/python/core/PyFrame
setglobal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline (I)V
re org/python/core/imp importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject;
setlocal
string " collections $ java/lang/String & Mapping (
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; * +
, markupsafe._compat . text_type 0 string_types 2 int_types 4 unichr 6 iteritems 8 PY2 : 1.0 < __version__ > org/python/core/PyList @ org/python/core/PyObject B Markup D soft_unicode F escape H
escape_silent J ([Lorg/python/core/PyObject;)V L M
A N __all__ P getname .(Ljava/lang/String;)Lorg/python/core/PyObject; R S
T compile V __getattr__ X S
C Y (|<[^>]*>) [ __call__ S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ] ^
C _
_striptags_re a &([^& ;]+); c
_entity_re e Markup$1
__module__ h __name__ jMarks a string as being safe for inclusion in HTML/XML output without
needing to be escaped. This implements the `__html__` interface a couple
of frameworks and web applications use. :class:`Markup` is a direct
subclass of `unicode` and provides all the methods of `unicode` just that
it escapes arguments passed and always returns `Markup`.
The `escape` function returns markup objects so that double escaping can't
happen.
The constructor of the :class:`Markup` class can be used for three
different things: When passed an unicode object it's assumed to be safe,
when passed an object with an HTML representation (has an `__html__`
method) that representation is used, otherwise the object passed is
converted into a unicode string and then assumed to be safe:
>>> Markup("Hello World!")
Markup(u'Hello World!')
>>> class Foo(object):
... def __html__(self):
... return 'foo'
...
>>> Markup(Foo())
Markup(u'foo')
If you want object passed being always treated as unsafe you can use the
:meth:`escape` classmethod to create a :class:`Markup` object:
>>> Markup.escape("Hello World!")
Markup(u'Hello <em>World</em>!')
Operations on a markup string are markup aware which means that all
arguments are passed through the :func:`escape` function:
>>> em = Markup("%s")
>>> em % "foo & bar"
Markup(u'foo & bar')
>>> strong = Markup("%(text)s")
>>> strong % {'text': ''}
Markup(u'<blink>hacker here</blink>')
>>> Markup("Hello ") + ""
Markup(u'Hello <foo>')
l org/python/core/PyTuple n org/python/core/Py p EmptyObjects [Lorg/python/core/PyObject; r s q t
o N __slots__ w y org/python/core/PyUnicode { /(Ljava/lang/String;)Lorg/python/core/PyUnicode; }
| ~ None ? strict ? org/python/core/PyFunction ? f_globals Lorg/python/core/PyObject; ? ? ? __new__$2 hasattr ? getglobal ? S
? getlocal (I)Lorg/python/core/PyObject; ? ?
? __html__ ? m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ] ?
C ? __nonzero__ ()Z ? ?
C ? 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; ] ?
C ? (ILorg/python/core/PyObject;)V ?
? _is 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
C ? __new__ ? f_lasti I ? ? ? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ] ?
C ?
markupsafe$py ? Lorg/python/core/PyCode; ? ? ? ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V L ?
? ?
__html__$3 ? ? ? ? __add__$4
isinstance ? __class__ ? super ? __add__ ? NotImplemented ? ? ? ? ?
__radd__$5 ? ? ? ? __radd__ ? __mul__$6 __mul__ ? ? ? ? ? __rmul__ ? __mod__$7 to_cell (II)V ? ?
? tuple ? f$8 __iter__ ()Lorg/python/core/PyObject; ? ?
C ? _MarkupEscapeHelper ? getderef ? ?
? java/lang/Object ?
f_savedlocals [Ljava/lang/Object; ? ? ? getGeneratorInput ()Ljava/lang/Object; ? ?
? org/python/core/PyException ? java/lang/Throwable ? __iternext__ ? ?
C ? ? ? q ? ? ? ? ?
getclosure ? ?
? ?(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;[Lorg/python/core/PyObject;)V L ?
? ? java/util/Arrays fill (([Ljava/lang/Object;Ljava/lang/Object;)V
__mod__ ? ? ?
__repr__$9 %s(%s) __repr__
_mod ?
C
? ? join$10 join map ? ? __setattr__
C split$11 list split!
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;#$
C% ? ?' rsplit$12 rsplit*) ? ?,
splitlines$13
splitlines/. ? ?1 unescape$14 ?Unescape markup again into an text_type string. This also resolves
known HTML4 and XHTML entities:
>>> Markup("Main » About").unescape()
u'Main \xbb About'
4 markupsafe._constants6
HTML_ENTITIES8 setderef: ?
; handle_match$15 group>
newInteger (I)Lorg/python/core/PyInteger;@A
qB _inD ?
CE __getitem__G ?
CH __getslice__ j(Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;JK
CL #xN #XP intR
startswithT #V setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException;XY
qZ
ValueError\ match (Lorg/python/core/PyObject;)Z^_
?`= ? ?b subd3 ? ?f unescapeh striptags$16Unescape markup into an text_type string and strip all tags. This
also resolves known HTML4 and XHTML entities. Whitespace is
normalized to one:
>>> Markup("Main » About").striptags()
u'Main \xbb About'
k mj ? ?o striptagsq escape$17 ?Escape the string. Works like :func:`escape` with the difference
that for subclasses of :class:`Markup` this function would return the
correct subclass.
t _isnotv ?
Cws ? ?y classmethod{ make_simple_escaping_wrapper$18 getattr~ func$19 _escape_argspec? enumerate? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ]?
C?? ? ??} ? ?? make_simple_escaping_wrapper?G
capitalize? title? lower? upper? replace? ljust? rjust? lstrip? rstrip? center? strip? translate?
expandtabs? swapcase? zfill? method? locals? __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V??
C? partition? partition$20? ? ??
rpartition$21
rpartition?? ? ?? format? format$22 unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;??
q? EscapeFormatter? _MagicFormatMapping? vformat?? ? ?? __html_format__$23 ,Unsupported format specification for Markup.?
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException;??
q?? ? ?? __html_format__?J dellocal (Ljava/lang/String;)V??
? getf_locals? ?
? g ? ?? makeClass a(Ljava/lang/String;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)Lorg/python/core/PyObject;??
q? _MagicFormatMapping$24 ?This class implements a dummy wrapper to fix a bug in the Python
standard library for string formatting.
See http://bugs.python.org/issue13598 for information about why
this is necessary.
? __init__$25 _args? _kwargs? _last_index?? ? ?? __init__? __getitem__$26 _eq? ?
C? _iadd? ?
C? LookupError? str?? ? ? __iter__$27 iter ? ? ?
__len__$28 len ? ? __len__
? ? ? Formatter EscapeFormatter$29 __init__$30 ? ? format_field$31 SNo format specification allowed when formatting an object with its __html__ method. format_field ? ? ? ? _escape_argspec$32 ,Helper for various string-wrapped functions.! ? ?# object% _MarkupEscapeHelper$33 Helper for Markup.__mod__( __init__$34 obj+* ? ?- f$35/ ? ?0 P(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)V L2
?3 f$365 ? ?6 __unicode__8 __str__: f$37 repr=<