m DMc<@sdZdkZdkZdkZdkZdkZdkZdkZdkZdk Z dk Z dk Z dk Z dk Z dklZdklZdklZdklZdklZdklZdkZdkZeidZd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDg<ZedEZeeeeghdFeeeeeeeedGZ edHZ!dIZ"eZ#dJe$fdKYZ%dBe%fdLYZ&dMZ'dNZ(e i)e&e(e'de%fdOYZ*dPe%fdQYZ+e+Z,de*fdRYZ-dAe*fdSYZ.de*fdTYZ/d=e*fdUYZ0d*e*fdVYZ1d%e*fdWYZ2d0e*fdXYZ3d4e*fdYYZ4d e*fdZYZ5d3e*fd[YZ6d e*fd\YZ7de*fd]YZ8de*fd^YZ9de*fd_YZ:de*fd`YZ;de*fdaYZ<de*fdbYZ=d.e*fdcYZ>d e*fddYZ?d e*fdeYZ@de*fdfYZAd e*fdgYZBde*fdhYZCde*fdiYZDd?e*fdjYZEd/e*fdkYZFde*fdlYZGde*fdmYZHd"e*fdnYZId$e*fdoYZJd'e*fdpYZKd&eKfdqYZLd7e*fdrYZMd9e*fdsYZNd>e*fdtYZOd:e*fduYZPd;e*fdvYZQd<e*fdwYZRd5e*fdxYZSde*fdyYZTde*fdzYZUd!e*fd{YZVd8eVfd|YZWd-e*fd}YZXd+e*fd~YZYd1e*fdYZZd2eVfdYZ[de*fdYZ\d#e*fdYZ]de*fdYZ^d e*fdYZ_d)e*fdYZ`eeeddZadZbdefdYZcehdZdehdZed(e%fdYZfegdjodkhZhehiindS(s This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) N(s HTMLParser(sname2codepoint(srender(sStorage(s highlight(s web2py_uuids | tAtBtBEAUTIFYtBODYtBRtCENTERtCODEtDIVtEMtEMBEDtFIELDSETtFORMtH1tH2tH3tH4tH5tH6tHEADtHRtHTMLtItIFRAMEtIMGtINPUTtLABELtLEGENDtLItLINKtOLtULtMARKMINtMENUtMETAtOBJECTtONtOPTIONtPtPREtSCRIPTtOPTGROUPtSELECTtSPANtSTYLEtTABLEtTAGtTDtTEXTAREAtTHtTHEADtTBODYtTFOOTtTITLEtTRtTTtURLtXHTMLtXMLt xmlescapetembed64cCst|dot|io|iSnt|ttfpt|}n't|to|idd}nti ||i dd}|S(s returns an escaped string of the provided data :param data: the data to be escaped :param quote: optional (default False) txmltutf8txmlcharrefreplacet's'N( thasattrtdatatcallableR<t isinstancetstrtunicodetencodetcgitescapetquotetreplace(RARI((t4/home/camdpams_www/Products_Activation/gluon/html.pyR:ds tc Cs |pg}|ph}d }}}|oR|i}|i}|i}|i}|d jo|idjo |i}qn|o |}n|o |}n|oPt |t p |i}qd|jo|idd\}}q|}n|o |o|p tdnt |ttfp |g}n|o>tiddig}|D]}|t |q`~pd}|ido|d7}n|ido|idng}xgt|iD]S\}}t |ttfp |g}nx!|D]}|i"||fqWqW| o d||||f}| t&jo |}n| t(jo d}nj| o$t | ttf o | g} ng}|D]*\}}|| jo|||fqq~}|d ti+t|}t-i.| |t/i0i1}||d<|i"d|fn|o|d|7}n|o|d ti+|7}n|o!|d tit |7}nt4i5di||||go td nt6i7|p| ||||||| | | S(s generate a URL example:: >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'], ... vars={'p':1, 'q':2}, anchor='1')) '/a/c/f/x/y/z?p=1&q=2#1' >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'], ... vars={'p':(1,3), 'q':2}, anchor='1')) '/a/c/f/x/y/z?p=1&p=3&q=2#1' >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'], ... vars={'p':(3,1), 'q':2}, anchor='1')) '/a/c/f/x/y/z?p=3&p=1&q=2#1' >>> str(URL(a='a', c='c', f='f', anchor='1+2')) '/a/c/f#1%2B2' >>> str(URL(a='a', c='c', f='f', args=['x', 'y', 'z'], ... vars={'p':(1,3), 'q':2}, anchor='1', hmac_key='key')) '/a/c/f/x/y/z?p=1&p=3&q=2&_signature=5d06bb8a4a6093dd325da2ee591c35c61afbd3c6#1' generates a url '/a/c/f' corresponding to application a, controller c and function f. If r=request is passed, a, c, f are set, respectively, to r.application, r.controller, r.function. The more typical usage is: URL(r=request, f='index') that generates a url for the index function within the present application and controller. :param a: application (default to current if r is given) :param c: controller (default to current if r is given) :param f: function (default to current if r is given) :param r: request (optional) :param args: any arguments (optional) :param vars: any variables (optional) :param anchor: anchorname, without # (optional) :param hmac_key: key to use when generating hmac signature (optional) :param hash_vars: which of the vars to include in our hmac signature True (default) - hash all vars, False - hash none of the vars, iterable - hash only the included vars ['key1','key2'] :param _request: used internally for URL rewrite :param scheme: URI scheme (True, 'http' or 'https', etc); forces absolute URL (optional) :param host: string to force absolute URL with host (True means http_host) :param port: optional port number (forces absolute URL) :raises SyntaxError: when no application, controller or function is available :raises SyntaxError: when a CRLF is found in the generated url thtmlt.is'not enough information to build the urlt/RLt _signatures /%s/%s/%s%st?s?%st#sCRLF Injection DetectedN(<targstvarstNonet applicationt controllertfunctiontrtenvt extensiontatctfRCRDt__name__tsplitt SyntaxErrortlistttupleturllibRItjoint_[1]txtothertendswiththas_keytpopt list_varstsortedtitemstkeytvalstvaltappendthmac_keyth_argst hash_varstTrueth_varstFalsetktvt urlencodetmessagethmactnewthashlibtsha1t hexdigesttsigtanchort regex_crlftsearchtrewriteturl_outt_requesttschemethosttport(R\R]R^RYRSRTRR[RZRsRuRRRRRtR|RqRVRhRRXRWRoRpRlRyRwRfRzRg((RKR7{sxE             K       > !% cCs%|iidptSn|ii}|i|i}} |iid| o>t i ddi g}| D]}|t|qk~pd}d|i|i|i|f}g} xgt|iD]S\} } t| ttfp | g} nx!| D]}| i| |fqWqW|tjo | }n|tjo d}n|ym|o$t|ttf o |g}ng}| D]*\} }| |jo|| |fqq~}Wn tSnX|dt i#t|}t%i&t||t(i)i*}||id<||jS(s Verifies that a request's args & vars have not been tampered with by the user :param request: web2py's request object :param hmac_key: the key to authenticate with, must be the same one previously used when calling URL() :param hash_vars: which vars to include in our hashing. (Optional) Only uses the 1st value currently (it's really a hack for the _gURL.verify lambda) True (or undefined) means all, False none, an iterable just the specified keys do not call directly. Use instead: URL.verify(hmac_key='...') the key has to match the one used to generate the URL. >>> r = Storage() >>> gv = Storage(p=(1,3),q=2,_signature='5d06bb8a4a6093dd325da2ee591c35c61afbd3c6') >>> r.update(dict(application='a', controller='c', function='f')) >>> r['args'] = ['x', 'y', 'z'] >>> r['get_vars'] = gv >>> verifyURL(r, 'key') True >>> verifyURL(r, 'kay') False >>> r.get_vars.p = (3, 1) >>> verifyURL(r, 'key') True >>> r.get_vars.p = (3, 2) >>> verifyURL(r, 'key') False RPRORLs /%s/%s/%s%sRQN(,trequesttget_varsRjRxRPt original_sigRSRTRkRdRIReRfRgRDRhRVRWRXRtRlRmRnRoRpRCRbRcRqRrRuRvRwRyRzR{R|R}R~RsRRRR(RRsRuRTRtR|RqRhRRlRSRoRpRyRwRfRzRgR((RKt verifyURL s<! K       B$ cs(d}ti|_d|_|S(s A proxy function for URL which contains knowledge of a given request object. Usage is exactly like URL except you do not have to specify r=request! cs|id ot|djo|dsN(RR7t__doc__tverify(RR((RRKt_gURLis    t XmlComponentcBstZdZdZRS(s/ Abstract root for all Html components cCs tdS(N(tNotImplementedError(tself((RKR<s(R_t __module__RR<(((RKRs cBstZdZeddddddddd d d d d g hdddg<dddg<ddg>> XML('

Hello

').xml() '

Hello

' R\tbt blockquotesbr/titlitoltultptcitetcodetpresimg/threfttitletimgtsrctaltttypecCss|oti|||}nt|to|idd}n!t|tpt|}n||_dS(s :param text: the XML text :param sanitize: sanitize text using the permitted tags and allowed attributes (default False) :param permitted_tags: list of permitted tags (default: simple list of tags) :param allowed_attributes: dictionary of allowed attributed (default for A, IMG and BlockQuote). The key is the tag; the value is a list of allowed attributes. R=R>N( tsanitizet sanitizerttexttpermitted_tagstallowed_attributesRCRERFRDR(RRRRR((RKt__init__s"  cCs|iS(N(RR(R((RKR<scCs |iS(N(RR<(R((RKt__str__scCsd||fS(Ns%s%s(RRh(RRh((RKt__add__scCsd||fS(Ns%s%s(RhR(RRh((RKt__radd__scCstt|t|S(N(tcmpRDRRh(RRh((RKt__cmp__scCstt|S(N(thashRDR(R((RKt__hash__scCstt||S(N(tgetattrRDRtname(RR((RKt __getattr__scCst||S(N(RDRR(RR((RKt __getitem__scCst|||!S(N(RDRRtj(RRR((RKt __getslice__sccsxt|D] }|Vq WdS(N(RDRR](RR]((RKt__iter__s cCstt|S(N(RRDR(R((RKt__len__scCs%|o||idhSn|iS(sZ return the text stored by the XML object rendered by the render function N(trenderRRRU(RR((RKtflattenscOsgS(s to be considered experimental since the behavior of this method is questionable another options could be TAG(self.text).elements(*args,**kargs) N((RRStkargs((RKtelementss(R_RRRxRR<RRRRRRRRRRRURR(((RKR9s c-            cCs ti|S(N(tmarshaltloadsRA(RA((RKt XML_unpicklescCsttit|ffS(N(RRtdumpsRDRA(RA((RKt XML_picklescBs+tZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z eed Zd ZedZdZdZdZdZdZedZeidZeidZeidZeidZdZdZ dZ!dZ"RS(s HTML helper, for easy generating and manipulating a DOM structure. Little or no validation is done. Behaves like a dictionary regarding updating of attributes. Behaves like a list regarding inserting/appending components. example:: >>> DIV('hello', 'world', _style='color:red;').xml() '
helloworld
' all other HTML helpers are derived from DIV. _something="value" attributes are transparently translated into something="value" HTML attributes tdivcOs|iddjo|otd|int|djo1t|dttfot|d|_nt||_||_|i |i d|_ x|iD]}|i|qWdS(s :param *components: any components that should be nested in this element :param **attributes: any attributes you want to give to this element :raises SyntaxError: when a stand alone tag receives components iROs <%s> tags cannot have componentsiiN(Rttagt componentsRaRRCRbRct attributest_fixupt_postprocessingRUtparentR]t_setnode(RRRR]((RKRs-     cKs+x$|iD]\}}|||>> a=DIV() >>> a.append(SPAN('x')) >>> print a
x
N(RRRRRrtretR(RRR((RKRr>s   cCs0|i||ii||}|i|S(s list style inserting of components >>> a=DIV() >>> a.insert(0,SPAN('x')) >>> print a
x
N(RRRRtinsertRRR(RRRR((RKRLs   cCsLt|to-y|i|SWqHtj o dSqHXn |i|SdS(s gets attribute with name 'i' or component #i. If attribute 'i' is not found returns None :param i: index if i is a string: the name of the attribute otherwise references to number of the component N(RCRRDRRtKeyErrorRUR(RR((RKRZs cCsE|i|t|ttfo||i|s <%s%s>%sN(RRRRR(RRR((RKR< s cCs |iS(s? str(COMPONENT) returns equals COMPONENT.xml() N(RR<(R((RKRscCsd}xg|iD]\}t|to|i|}n*|o|t |}n t |}||7}qW|o|||i |i }n|S(sC return the text stored by the DIV object rendered by the render function the render function must take text, tagname, and attributes render=None is equivalent to render=lambda text, tag, attr: text >>> markdown = lambda text,tag=None,attributes={}: {None: re.sub('\s+',' ',text), 'h1':'#'+text+'\n\n', 'p':text+'\n'}.get(tag,text) >>> a=TAG('

Header

this is a test

') >>> a.flatten(markdown) '#Header\n\nthis is a test\n' RLN( RRRR]RCRRRtsRDRR(RRR]RR((RKR"s   s ^[\w\-\:]+s #([\w\-]+)s \.([\w\-]+)s\[([\w\-\:]+)=(.*?)\]cOst|djo8g}|didD]} || iq+~}nt|djoDg}|D]} ||i| |qi~}t d|gSnt|djo|di}t|djo^g}|i|dD]&} || idi |d|q~}t d|gSqy|d}d|jpd|jp d |jo|ii|}|ii|}|ii|}|ii|}g}|o|ig}n|o|id|d >> a = DIV(DIV(SPAN('x'),3,DIV(SPAN('y')))) >>> for c in a.elements('span',first_only=True): c[0]='z' >>> print a
z3
y
>>> for c in a.elements('span'): c[0]='z' >>> print a
z3
z
It also supports a syntax compatible with jQuery >>> a=TAG('
hello

world

') >>> for e in a.elements('div a#1-1, p.is'): print e.flatten() hello world >>> for e in a.elements('#1-1'): print e.flatten() hello >>> a.elements('a[u:v=$]')[0].xml() 'hello' >>> a=FORM( INPUT(_type='text'), SELECT(range(1)), TEXTAREA() ) >>> for c in a.elements('input, select, textarea'): c['_disabled'] = 'disabled' >>> a.xml() '
' iit,cCs||S(N(R\R(R\R((RKRgst cCs||S(N(R\R(R\R((RKRlsRRRNt[t_ids(?>> print TAG.first(TAG.second('test'), _key = 3) test cCs |i|S(N(RRR(RR((RKRscsiddjod dnttoidndtfdYdS(NiRROsutf-8t__tag__cstZZRS(N(R_RRR((R(RKRscs ||S(N(RR\R(R\R(R(RKRs(RRCRERFRR(RRR((RRRKRs cCstti|iS(N(tweb2pyHTMLParsertdecoderRMttree(RRM((RKt__call__s(R_RRRRR(((RKRs   cBs5tZdZdZdZdZdZdZdZRS(s There are four predefined document type definitions. They can be specified in the 'doctype' parameter: -'strict' enables strict doctype -'transitional' enables transitional doctype (default) -'frameset' enables frameset doctype -'html5' enables HTML 5 doctype -any other string will be treated as user's own doctype 'lang' parameter specifies the language of the document. Defaults to 'en'. See also :class:`DIV` RMs[ sg sf s cCs|d}|p d}n||id<|d}|ov|djo |i}q|djo |i}q|djo |i}q|djo |i}qd |}n |i}|i\}}d ||i |||i fS( Ntlangtent_langtdoctypetstrictt transitionaltframesetthtml5s%s s%s<%s%s>%s( RRRRRRRRRRRR(RRRRR((RKR<s$             ( R_RRRRRRRR<(((RKRs cBs5tZdZdZdZdZdZdZdZRS(sR This is XHTML version of the HTML helper. There are three predefined document type definitions. They can be specified in the 'doctype' parameter: -'strict' enables strict doctype -'transitional' enables transitional doctype (default) -'frameset' enables frameset doctype -any other string will be treated as user's own doctype 'lang' parameter specifies the language of the document and the xml document. Defaults to 'en'. 'xmlns' parameter specifies the xml namespace. Defaults to 'http://www.w3.org/1999/xhtml'. See also :class:`DIV` RMsn sz sr shttp://www.w3.org/1999/xhtmlcCs |d}|o||id%s( RRRRRRRRRRRR(RRRRRR((RKR<Es*             ( R_RRRRRRRR<(((RKR8)s cBstZdZRS(Nthead(R_RR(((RKR`scBstZdZRS(NR(R_RR(((RKR4dscBstZdZRS(Nsmeta/(R_RR(((RKR!iscBstZdZRS(Nslink/(R_RR(((RKRnscBstZdZdZRS(NtscriptcCs{|i\}}dig}|iD]}|t|q&~}|od|i |||i fSnt i |SdS(Ns s<%s%s>( RRRRReRfRRRDRRR<(RRRRfR((RKR<ws 3(R_RRR<(((RKR'sscBstZdZdZRS(NtstylecCs{|i\}}dig}|iD]}|t|q&~}|od|i |||i fSnt i |SdS(Ns s4<%s%s>( RRRRReRfRRRDRRR<(RRRRfR((RKR<s 3(R_RRR<(((RKR+scBstZdZRS(Nsimg/(R_RR(((RKRscBstZdZRS(Ntspan(R_RR(((RKR*scBstZdZRS(Ntbody(R_RR(((RKRscBstZdZRS(Nth1(R_RR(((RKR scBstZdZRS(Nth2(R_RR(((RKR scBstZdZRS(Nth3(R_RR(((RKRscBstZdZRS(Nth4(R_RR(((RKRscBstZdZRS(Nth5(R_RR(((RKRscBstZdZRS(Nth6(R_RR(((RKRscBstZdZdZdZRS(sl Will replace ``\n`` by ``
`` if the `cr2br` attribute is provided. see also :class:`DIV` RcCs4ti|}|do|idd}n|S(Ntcr2brs s
(RR<RRRJ(RR((RKR<s (R_RRRR<(((RKR%s cBstZdZRS(NR(R_RR(((RKRscBstZdZRS(Nsbr/(R_RR(((RKRscBstZdZRS(Nshr/(R_RR(((RKRscBstZdZdZRS(NR\cCs8|do d|d|df|d>> INPUT(_type='text', _name='name', value='Max').xml() '' >>> INPUT(_type='checkbox', _name='checkbox', value='on').xml() '' >>> INPUT(_type='radio', _name='radio', _value='yes', value='yes').xml() '' >>> INPUT(_type='radio', _name='radio', _value='no', value='yes').xml() '' the input helper takes two special attributes value= and requires=. :param value: used to pass the initial value for the input field. value differs from _value because it works for checkboxes, radio, textarea and select/option too. - for a checkbox value should be '' or 'on'. - for a radio or select/option value should be the _value of the checked/selected item. :param requires: should be None, or a validator or a list of validators for the value of the field. sinput/cCs|d}|djp |djotSnt|}|ddjoC|dp|dpd|d<|ii|d}||dti |t|i|dddddd|i Snti |SdS(NRRRRterrorRs %s__error( RRR9RURR@RRvRR<(RR((RKR<s >(R_RRRRRR<(((RKRs  # cBstZdZdZdZRS(s example:: TEXTAREA(_name='sometext', value='blah '*100, requires=IS_NOT_EMPTY()) 'blah blah blah ...' will be the content of the textarea field. ttextareacCsd|ijod|d>> from validators import IS_IN_SET >>> SELECT('yes', 'no', _name='selector', value='yes', ... requires=IS_IN_SET(['yes', 'no'])).xml() '' tselectcCsmg}xW|iD]L}t|ttfo|i|q|it|dt|qW||_dS(NRF(RRR]RCR$R(RrRD(RR]R((RKRIs #cCsog}xE|iD]:}t|to|i|iq|i|gqWti|}|d}|djo|dpQx|D]B}|o+t |dt |jod|d>> from validators import IS_NOT_EMPTY >>> form=FORM(INPUT(_name="test", requires=IS_NOT_EMPTY())) >>> form.xml() '
' a FORM is container for INPUT, TEXTAREA, SELECT and other helpers form has one important method:: form.accepts(request.vars, session) if form is accepted (and all validators pass) form.vars contains the accepted vars, otherwise form.errors contains the errors. in case of errors the form is modified to present the errors to the user. tformcOs;ti|||t|_t|_t|_dS(N( RRRRRtStorageRTRR(RRR((RKRs  tdefaultc Cs|iidjo |i}n|iit|_|ii |||_ ||_ ||_ t }|i o=|i id|i d}||iijo t}qn|i |iijo t}n|oA|i o7t|do#|i|jot}t |_qn|i||}|ot|to}|idd} |idd} | o|o| |n| o2|o+| o#| |t|idj}qq|oMt|t t!fo)g} |D]} | | |q~ q||qn|io t}n|djo?t|do |i}n t$}||_|d|>> BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml() '
a
b
hello:
world
' turns any list, dictionary, etc into decent looking html. Two special attributes are :sorted: a function that takes the dict and returned sorted keys :keyfilter: a funciton that takes a key and returns its representation or None if the key is to be skipped. By default key[:1]=='_' is skipped. RcCs|d djodSn|S(NiR(RoRU(Ro((RKt no_underscoresc Ks|g|_||_|idt}|idti}g}t i |i}|iddd} |d|do3|d |d<|i|i|d|d n|p!d |ijoL|d |jo;|do|dd |d|d>> from validators import * >>> print DIV(A('click me', _href=URL(a='a', c='b', f='c')), BR(), HR(), DIV(SPAN("World"), _class='unknown')).xml() >>> print DIV(UL("doc","cat","mouse")).xml()
  • doc
  • cat
  • mouse
>>> print DIV(UL("doc", LI("cat", _class='feline'), 18)).xml()
  • doc
  • cat
  • 18
>>> print TABLE(['a', 'b', 'c'], TR('d', 'e', 'f'), TR(TD(1), TD(2), TD(3))).xml()
abc
def
123
>>> form=FORM(INPUT(_type='text', _name='myvar', requires=IS_EXPR('int(value)<10'))) >>> print form.xml()
>>> print form.accepts({'myvar':'34'}, formname=None) False >>> print form.xml()
invalid expression
>>> print form.accepts({'myvar':'4'}, formname=None, keepvalues=True) True >>> print form.xml()
>>> form=FORM(SELECT('cat', 'dog', _name='myvar')) >>> print form.accepts({'myvar':'dog'}, formname=None, keepvalues=True) True >>> print form.xml()
>>> form=FORM(INPUT(_type='text', _name='myvar', requires=IS_MATCH('^\w+$', 'only alphanumeric!'))) >>> print form.accepts({'myvar':'as df'}, formname=None) False >>> print form.xml()
only alphanumeric!
>>> session={} >>> form=FORM(INPUT(value="Hello World", _name="var", requires=IS_MATCH('^\w+$'))) >>> if form.accepts({}, session,formname=None): print 'passed' >>> if form.accepts({'var':'test ', '_formkey': session['_formkey[None]']}, session, formname=None): print 'passed' N((((RKttests&RcBsGtZdZd dZdZdZdZdZdZRS( sY obj = web2pyHTMLParser(text) parses and html/xml text into web2py helpers. obj.tree contains the root of the tree, and tree can be manipulated >>> str(web2pyHTMLParser('hello
wor<ldxxxyyy
zzz' >>> str(web2pyHTMLParser('
ab
c').tree) '
ab
c' >>> tree = web2pyHTMLParser('hello
world
').tree >>> tree.element(_a='b')['_c']=5 >>> str(tree) 'hello
world
' tinputR5cCsti|td|_|_||_g}tD]'}t t |t o ||q8q8~|_ d|_|i|dS(NRL(t HTMLParserRRR-RRtclosedRft__all__RgRCtevalRttagsRUtlasttfeedR(RRRRfRg((RKRs   > cCs|i|ijot|i}n,||ijo|d7}nt|}x"|D]\}}||d|RBRs ----- s ------ R<R=s | RRR;s**%s**R0Rs''%s''R1Rs``%s``R\s [[%s %s]]R.RLRs[[%s %s left]]Rsno titleR(RRURRRRJRR9(RRR((RKtmarkmin_serializersB               *cBsGtZdZhhddZdZdZedZdZRS(sK For documentation: http://web2py.com/examples/static/markmin.html RcCs(||_||_||_||_dS(N(RRtextratallowedtsep(RRRRR((RKRs   cCs(t|id|id|id|iS(s\ calls the gluon.contrib.markmin render function to convert the wiki syntax RRRN(RRRRRR(R((RKR<scCs |iS(N(RR<(R((RKR$scCs|iS(s^ return the text stored by the MARKMIN object rendered by the render function N(RR(RR((RKR'scOs |igS(s to be considered experimental since the behavior of this method is questionable another options could be TAG(self.text).elements(*args,**kargs) N(RR(RRSR((RKR-s( R_RRRR<RRURR(((RKRs    t__main__(jRRGRRRRRdRRRR]Rtcopy_regRRthtmlentitydefsRtcontrib.markmin.markmin2htmlRtstorageRdR:tutilsRtR}RRRRRvR:RUR7RRR#RVRR9RRtpickleRRR-RR8RR4R!RR'R+RR*RR R RRRRR%RRRRRR R6R&RRRRRRR.R0R5R1R2R3R,RRRR/R$R"R(R)R RR RR R;RRRRRR_tdoctestttestmod(^R"RRR(R&RR-RR0R7R%R3R8R#RR/R RGRRRdR+RRR!RR)RRRRdRRRRR R;RR R RR RRRRR]RR:RRR$RR4RRRtR'RR,R9RRRRRR*RR:RRRR2RRRRR6R5RRRRR.RRR RRRR1RRR}((RKRQs                     @ 6 \  i   .7.p 4xK; *:!