diff --git a/VERSION b/VERSION index db523a80..d07564d7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.9.9-stable+timestamp.2014.09.08.08.12.34 +Version 2.9.9-stable+timestamp.2014.09.08.19.18.48 diff --git a/gluon/html.py b/gluon/html.py index 50ca9054..1a493a20 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -31,6 +31,7 @@ from gluon.storage import Storage from gluon.utils import web2py_uuid, simple_hash, compare from gluon.highlight import highlight + regex_crlf = re.compile('\r|\n') join = ''.join @@ -43,6 +44,7 @@ entitydefs.setdefault('apos', u"'".encode('utf-8')) __all__ = [ 'A', + 'ASSIGNJS', 'B', 'BEAUTIFY', 'BODY', @@ -2825,6 +2827,14 @@ class MARKMIN(XmlComponent): def __str__(self): return self.xml() +def ASSIGNJS(**kargs): + from serializers import json + s = "" + for key, value in kargs.items(): + s+='var %s = %s;\n' % (key, json(value)) + return XML(s) + + if __name__ == '__main__': import doctest doctest.testmod()