Skip to content

Commit

Permalink
Merge pull request nextcloud#23264 from nextcloud/bug/23177/escape-html
Browse files Browse the repository at this point in the history
Add local version of escapeHTML
  • Loading branch information
rullzer committed Oct 9, 2020
2 parents 049d5b3 + d0f18f4 commit 2ec160a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/files_external/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ function highlightInput($input) {
* @param {int} userListLimit page size for result list
*/
function addSelect2 ($elements, userListLimit) {
var escapeHTML = function (text) {
return text.toString()
.split('&').join('&')
.split('<').join('&lt;')
.split('>').join('&gt;')
.split('"').join('&quot;')
.split('\'').join('&#039;');
};
if (!$elements.length) {
return;
}
Expand Down

0 comments on commit 2ec160a

Please sign in to comment.