Skip to content
This repository was archived by the owner on Sep 10, 2023. It is now read-only.

Commit 10e1a63

Browse files
author
Wilson Lee
committed
Remove unescapeHTML, since it is not used
1 parent c0f9097 commit 10e1a63

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/jquery.tokeninput.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,8 @@ var HTML_ESCAPES = {
117117
'/': '/'
118118
};
119119

120-
var HTML_UNESCAPES = {
121-
'&': '&',
122-
'&lt;': '<',
123-
'&gt;': '>',
124-
'&quot;': '"',
125-
'&#x27;': "'",
126-
'&#x2F;': '/'
127-
};
128-
129120
var HTML_ESCAPE_CHARS = /[&<>"'\/]/g;
130121

131-
var HTML_UNESCAPE_TOKENS = /&amp;|&lt;|&gt;|&quot;|&#x27;|&#x2F;/g;
132-
133122
function coerceToString(val) {
134123
return String((val === null || val === undefined) ? '' : val);
135124
}
@@ -140,12 +129,6 @@ function _escapeHTML(text) {
140129
});
141130
}
142131

143-
function _unescapeHTML(text) {
144-
return coerceToString(text).replace(HTML_UNESCAPE_TOKENS, function(match) {
145-
return HTML_UNESCAPES[match];
146-
});
147-
}
148-
149132
// Additional public (exposed) methods
150133
var methods = {
151134
init: function(url_or_data_or_function, options) {
@@ -496,10 +479,6 @@ $.TokenList = function (input, url_or_data, settings) {
496479
return settings.enableHTML ? text : _escapeHTML(text);
497480
}
498481

499-
function unescapeHTML(text) {
500-
return settings.enableHTML ? text : _unescapeHTML(text);
501-
}
502-
503482
// Toggles the widget between enabled and disabled state, or according
504483
// to the [disable] parameter.
505484
function toggleDisabled(disable) {

0 commit comments

Comments
 (0)