From a131d9ce551aded184bc4dbfd7257594b212b92a Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 17 Jul 2015 12:20:33 -0400 Subject: [PATCH] Fixed JavaScript "no-octal-escape" violations. --- .eslintrc | 2 +- .../admin/static/admin/js/admin/DateTimeShortcuts.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.eslintrc b/.eslintrc index ff7610fd2c..9c313a42a1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,7 +17,7 @@ "no-eval": [1], "no-extend-native": [2, {"exceptions": ["Date", "String"]}], "no-multi-spaces": [2], - "no-octal-escape": [1], + "no-octal-escape": [2], "no-underscore-dangle": [1], "no-unused-vars": [2, {"vars": "local", "args": "none"}], "no-script-url": [1], diff --git a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js b/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js index a0e750de82..871b96cfd4 100644 --- a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js +++ b/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js @@ -112,9 +112,9 @@ var DateTimeShortcuts = { 'class', 'clock-icon', 'title', gettext('Choose a Time') ); - shortcuts_span.appendChild(document.createTextNode('\240')); + shortcuts_span.appendChild(document.createTextNode('\u00A0')); shortcuts_span.appendChild(now_link); - shortcuts_span.appendChild(document.createTextNode('\240|\240')); + shortcuts_span.appendChild(document.createTextNode('\u00A0|\u00A0')); shortcuts_span.appendChild(clock_link); // Create clock link div @@ -220,9 +220,9 @@ var DateTimeShortcuts = { 'class', 'date-icon', 'title', gettext('Choose a Date') ); - shortcuts_span.appendChild(document.createTextNode('\240')); + shortcuts_span.appendChild(document.createTextNode('\u00A0')); shortcuts_span.appendChild(today_link); - shortcuts_span.appendChild(document.createTextNode('\240|\240')); + shortcuts_span.appendChild(document.createTextNode('\u00A0|\u00A0')); shortcuts_span.appendChild(cal_link); // Create calendarbox div. @@ -267,9 +267,9 @@ var DateTimeShortcuts = { var shortcuts = quickElement('div', cal_box); shortcuts.className = 'calendar-shortcuts'; quickElement('a', shortcuts, gettext('Yesterday'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', -1);'); - shortcuts.appendChild(document.createTextNode('\240|\240')); + shortcuts.appendChild(document.createTextNode('\u00A0|\u00A0')); quickElement('a', shortcuts, gettext('Today'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', 0);'); - shortcuts.appendChild(document.createTextNode('\240|\240')); + shortcuts.appendChild(document.createTextNode('\u00A0|\u00A0')); quickElement('a', shortcuts, gettext('Tomorrow'), 'href', 'javascript:DateTimeShortcuts.handleCalendarQuickLink(' + num + ', +1);'); // cancel bar