Merge pull request #1482 from niphlod/fix/1407_and_T_v2

fixes #1407 passing a properly escaped string
This commit is contained in:
mdipierro
2016-09-30 17:14:45 -05:00
committed by GitHub
4 changed files with 21 additions and 15 deletions
+7 -5
View File
@@ -1,10 +1,12 @@
<script type="text/javascript"><!--
// These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below).
var w2p_ajax_confirm_message = '{{=T('Are you sure you want to delete this object?')}}';
var w2p_ajax_disable_with_message = '{{=T('Working...')}}';
var w2p_ajax_date_format = '{{=T('%Y-%m-%d')}}';
var w2p_ajax_datetime_format = '{{=T('%Y-%m-%d %H:%M:%S')}}';
var ajax_error_500 = '{{=T.M('An error occured, please [[reload %s]] the page') % URL(args=request.args, vars=request.get_vars) }}';
{{=ASSIGNJS(
w2p_ajax_confirm_message = T('Are you sure you want to delete this object?'),
w2p_ajax_disable_with_message = T('Working...'),
w2p_ajax_date_format = T('%Y-%m-%d'),
w2p_ajax_datetime_format = T('%Y-%m-%d %H:%M:%S'),
ajax_error_500 = T.M('An error occured, please [[reload %s]] the page') % URL(args=request.args, vars=request.get_vars)
)}}
//--></script>
{{
response.files.insert(0,URL('static','js/jquery.js'))
+6 -5
View File
@@ -1,10 +1,11 @@
<script type="text/javascript"><!--
// These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below).
var w2p_ajax_confirm_message = '{{=T('Are you sure you want to delete this object?')}}';
var w2p_ajax_disable_with_message = '{{=T('Working...')}}';
var w2p_ajax_date_format = '{{=T('%Y-%m-%d')}}';
var w2p_ajax_datetime_format = '{{=T('%Y-%m-%d %H:%M:%S')}}';
var ajax_error_500 = '{{=T.M('An error occured, please [[reload %s]] the page') % URL(args=request.args, vars=request.get_vars) }}';
{{=ASSIGNJS(
w2p_ajax_confirm_message = T('Are you sure you want to delete this object?'),
w2p_ajax_date_format = T('%Y-%m-%d'),
w2p_ajax_datetime_format = T('%Y-%m-%d %H:%M:%S'),
ajax_error_500 = T.M('An error occured, please [[reload %s]] the page') % URL(args=request.args, vars=request.get_vars)
)}}
//--></script>
{{
response.files.insert(0,URL('static','js/jquery.js'))
+7 -5
View File
@@ -1,10 +1,12 @@
<script type="text/javascript"><!--
// These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below).
var w2p_ajax_confirm_message = '{{=T('Are you sure you want to delete this object?')}}';
var w2p_ajax_disable_with_message = '{{=T('Working...')}}';
var w2p_ajax_date_format = '{{=T('%Y-%m-%d')}}';
var w2p_ajax_datetime_format = '{{=T('%Y-%m-%d %H:%M:%S')}}';
var ajax_error_500 = '{{=T.M('An error occured, please [[reload %s]] the page') % URL(args=request.args, vars=request.get_vars) }}';
{{=ASSIGNJS(
w2p_ajax_confirm_message = T('Are you sure you want to delete this object?'),
w2p_ajax_disable_with_message = T('Working...'),
w2p_ajax_date_format = T('%Y-%m-%d'),
w2p_ajax_datetime_format = T('%Y-%m-%d %H:%M:%S'),
ajax_error_500 = T.M('An error occured, please [[reload %s]] the page') % URL(args=request.args, vars=request.get_vars)
)}}
//--></script>
{{
response.files.insert(0,URL('static','js/jquery.js'))
+1
View File
@@ -31,6 +31,7 @@ class TestAppAdmin(unittest.TestCase):
def setUp(self):
from gluon.globals import Request, Response, Session, current
from gluon.html import A, DIV, FORM, MENU, TABLE, TR, INPUT, URL, XML
from gluon.html import ASSIGNJS
from gluon.validators import IS_NOT_EMPTY
from gluon.compileapp import LOAD
from gluon.http import HTTP, redirect