diff --git a/cms/templates/login.html b/cms/templates/login.html index eaa0a1940b..c4966f8b66 100644 --- a/cms/templates/login.html +++ b/cms/templates/login.html @@ -55,7 +55,7 @@ from openedx.core.djangolib.js_utils import js_escaped_string <%block name="page_bundle"> - <%static:require_page page_name="js/pages/login" class_name="LoginFactory"> + <%static:invoke_page_bundle page_name="js/pages/login" class_name="LoginFactory"> "${reverse('homepage') | n, js_escaped_string}" - + diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 492926aece..56593458f5 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -154,7 +154,7 @@ source, template_path = Loader(engine).load_template_source(path) -<%def name="require_page(page_name, class_name)"> +<%def name="invoke_page_bundle(page_name, class_name)"> <%doc> Loads Javascript onto your page synchronously. Uses RequireJS in development and a plain script tag in production. diff --git a/common/static/common/js/utils/page_factory.js b/common/static/common/js/utils/page_factory.js index 8b3e72c827..3ae02bca25 100644 --- a/common/static/common/js/utils/page_factory.js +++ b/common/static/common/js/utils/page_factory.js @@ -8,7 +8,7 @@ define([], function() { throw Error( 'window.pageFactoryArguments must be initialized before calling invokePageFactory(' + name + - '). Use the <%static:require_page> template tag.' + '). Use the <%static:invoke_page_bundle> template tag.' ); } args = window.pageFactoryArguments[name]; @@ -19,7 +19,7 @@ define([], function() { name + '"] must be initialized before calling invokePageFactory(' + name + - '). Use the <%static:require_page> template tag.' + '). Use the <%static:invoke_page_bundle> template tag.' ); } factory.apply(null, window.pageFactoryArguments[name]); diff --git a/common/test/test-theme/cms/templates/login.html b/common/test/test-theme/cms/templates/login.html index 496f0e9032..4e13b5cdc9 100644 --- a/common/test/test-theme/cms/templates/login.html +++ b/common/test/test-theme/cms/templates/login.html @@ -53,7 +53,7 @@ from openedx.core.djangolib.js_utils import js_escaped_string <%block name="page_bundle"> - <%static:require_page page_name="js/pages/login" class_name="LoginFactory"> + <%static:invoke_page_bundle page_name="js/pages/login" class_name="LoginFactory"> "${reverse('homepage') | n, js_escaped_string}" - + diff --git a/scripts/xss_linter.py b/scripts/xss_linter.py index d1d0fe0d07..985bc44761 100755 --- a/scripts/xss_linter.py +++ b/scripts/xss_linter.py @@ -2383,8 +2383,8 @@ class MakoTemplateLinter(BaseLinter): | # script tag end <%static:require_module(_async)?.*?> | # require js script tag start (optionally the _async version) | # require js script tag end (optionally the _async version) - <%static:require_page.*?> | # require js script tag start - | # require js script tag end + <%static:invoke_page_bundle.*?> | # require js script tag start + | # require js script tag end <%static:webpack.*?> | # webpack script tag start | # webpack script tag end <%static:studiofrontend.*?> | # studiofrontend script tag start diff --git a/themes/red-theme/cms/templates/login.html b/themes/red-theme/cms/templates/login.html index b7318c1e88..721104311d 100644 --- a/themes/red-theme/cms/templates/login.html +++ b/themes/red-theme/cms/templates/login.html @@ -52,7 +52,7 @@ from django.utils.translation import ugettext as _ <%block name="page_bundle"> - <%static:require_page page_name="js/pages/login" class_name="LoginFactory"> + <%static:invoke_page_bundle page_name="js/pages/login" class_name="LoginFactory"> "${reverse('homepage') | n, js_escaped_string}" - +