]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Added: Use_escapejs_filter_on_JavaScript_strings.patch
authorThomas Goirand <thomas@goirand.fr>
Wed, 21 May 2014 00:43:00 +0000 (08:43 +0800)
committerThomas Goirand <thomas@goirand.fr>
Wed, 21 May 2014 00:43:00 +0000 (08:43 +0800)
Rewritten-From: 214fc669356cb15fce5e8600bf8d534c3829c90b

xenial/debian/changelog
xenial/debian/patches/Use_escapejs_filter_on_JavaScript_strings.patch [new file with mode: 0644]
xenial/debian/patches/series

index 3b21241831ba44d77a3ad51649788ff3eba0c9aa..66ec67006bd02b814c9eb7e23490410c45657a80 100644 (file)
@@ -1,3 +1,9 @@
+horizon (2014.1-2) unstable; urgency=medium
+
+  * Added Use_escapejs_filter_on_JavaScript_strings.patch.
+
+ -- Thomas Goirand <zigo@debian.org>  Wed, 21 May 2014 08:42:42 +0800
+
 horizon (2014.1-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/xenial/debian/patches/Use_escapejs_filter_on_JavaScript_strings.patch b/xenial/debian/patches/Use_escapejs_filter_on_JavaScript_strings.patch
new file mode 100644 (file)
index 0000000..dc000b0
--- /dev/null
@@ -0,0 +1,33 @@
+From: Adrien Cunin <adrien.cunin@osones.com>
+Date: Tue, 22 Apr 2014 10:54:33 +0000 (+0200)
+Subject: Use escapejs filter on JavaScript strings
+X-Git-Url: https://review.openstack.org/gitweb?p=openstack%2Fhorizon.git;a=commitdiff_plain;h=232b71286f3b1426412a3ffbed5d7065c2e24275
+
+Use escapejs filter on JavaScript strings
+
+The escapejs filter will correctly escape single quotes from JavaScript
+strings which may otherwise trigger syntax errors. In this case, the
+issue was visible using the French translation.
+
+Also removed a trailing paranthesis coming out of nowhere.
+
+Change-Id: I25001815e17be5afa8eb28cc28c5423e3dcd973c
+Closes-Bug: #1311047
+(cherry picked from commit bc6f40b51d53682054cc4ba28b55b5045d6c8605)
+---
+
+diff --git a/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html b/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html
+index 9abfc82..5cb2c55 100644
+--- a/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html
++++ b/openstack_dashboard/dashboards/project/instances/templates/instances/_flavors_and_quotas.html
+@@ -40,8 +40,8 @@
+ </div>
+ <script type="text/javascript" charset="utf-8">
+-  some_disabled_msg = '{{_("Some flavors not meeting minimum image requirements have been disabled.")}}';
+-  all_disabled_msg = '{{_("No flavors meet minimum criteria for selected image.")}})';
++  some_disabled_msg = '{{_("Some flavors not meeting minimum image requirements have been disabled.")|escapejs}}';
++  all_disabled_msg = '{{_("No flavors meet minimum criteria for selected image.")|escapejs}}';
+   if(typeof horizon.Quota !== 'undefined') {
+     horizon.Quota.initWithFlavors({{ flavors|safe|default:"{}" }});
index a017bfa83efd75d565b1ae5186708e7078ea0c85..f0061f4a95f7c12538e0a620187b78935c99e0db 100644 (file)
@@ -2,3 +2,4 @@ fix-dashboard-django-wsgi.patch
 fix-dashboard-manage.patch
 fixed-horizon-MANIFEST.in.patch
 fix-python-m-coverage.patch
+Use_escapejs_filter_on_JavaScript_strings.patch