Defect #33846 » sanitize_html.patch
| public/javascripts/application.js | ||
|---|---|---|
| 8 | 8 |
} |
| 9 | 9 |
}); |
| 10 | 10 | |
| 11 |
function sanitizeHTML(string) {
|
|
| 12 |
var temp = document.createElement('span');
|
|
| 13 |
temp.textContent = string; |
|
| 14 |
return temp.innerHTML; |
|
| 15 |
} |
|
| 16 | ||
| 11 | 17 |
function checkAll(id, checked) {
|
| 12 | 18 |
$('#'+id).find('input[type=checkbox]:enabled').prop('checked', checked);
|
| 13 | 19 |
} |
| ... | ... | |
| 1084 | 1090 |
selectTemplate: function (issue) {
|
| 1085 | 1091 |
return '#' + issue.original.id; |
| 1086 | 1092 |
}, |
| 1093 |
menuItemTemplate: function (item) {
|
|
| 1094 |
return sanitizeHTML(item.string); |
|
| 1095 |
}, |
|
| 1087 | 1096 |
noMatchTemplate: function () {
|
| 1088 | 1097 |
return '<span style:"visibility: hidden;"></span>'; |
| 1089 | 1098 |
} |