Merge pull request #703 from jelte12345/master
Fixed my own XSS pull request to actually work
This commit is contained in:
commit
fcea1523fd
15
select2.js
15
select2.js
@ -2450,16 +2450,15 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
escapeMarkup: function (markup) {
|
||||
var replace_map = {
|
||||
'\\': '\',
|
||||
'&': '&#amp;',
|
||||
'<': '&#lt;',
|
||||
'>': '&#rt;',
|
||||
'"': '&#quot;',
|
||||
"'": ''',
|
||||
"/": '/'
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": ''',
|
||||
"/": '/'
|
||||
};
|
||||
//'--': '--'
|
||||
|
||||
return String(html).replace(/[&<>"'/\\]/g, function (match) {
|
||||
return String(markup).replace(/[&<>"'/\\]/g, function (match) {
|
||||
return replace_map[match[0]];
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user