mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Refs #25165 -- Removed unnecessary HTML unescaping in admin add/edit popups.
Because we now load data into the page via JSON, we don't need to unescape it anymore.
This commit is contained in:
parent
780bddf75b
commit
cbaa3ee3ee
2 changed files with 1 additions and 30 deletions
|
|
@ -1,21 +1,10 @@
|
|||
/* global module, test, html_unescape, id_to_windowname,
|
||||
/* global module, test, id_to_windowname,
|
||||
windowname_to_id */
|
||||
/* eslint global-strict: 0, strict: 0 */
|
||||
'use strict';
|
||||
|
||||
module('admin.RelatedObjectLookups');
|
||||
|
||||
test('html_unescape', function(assert) {
|
||||
function assert_unescape(then, expected, message) {
|
||||
assert.equal(html_unescape(then), expected, message);
|
||||
}
|
||||
assert_unescape('<', '<', 'less thans are unescaped');
|
||||
assert_unescape('>', '>', 'greater thans are unescaped');
|
||||
assert_unescape('"', '"', 'double quotes are unescaped');
|
||||
assert_unescape(''', "'", 'single quotes are unescaped');
|
||||
assert_unescape('&', '&', 'ampersands are unescaped');
|
||||
});
|
||||
|
||||
test('id_to_windowname', function(assert) {
|
||||
assert.equal(id_to_windowname('.test'), '__dot__test');
|
||||
assert.equal(id_to_windowname('misc-test'), 'misc__dash__test');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue