Przeglądaj źródła

Fix encoding issue with OC.Notification.show

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v21.0.0beta7
Joas Schilling 3 lat temu
rodzic
commit
613606fb88
No account linked to committer's email address

+ 1
- 1
core/js/dist/login.js
Plik diff jest za duży
Wyświetl plik


+ 1
- 1
core/js/dist/login.js.map
Plik diff jest za duży
Wyświetl plik


+ 1
- 1
core/js/dist/main.js
Plik diff jest za duży
Wyświetl plik


+ 1
- 1
core/js/dist/main.js.map
Plik diff jest za duży
Wyświetl plik


+ 10
- 1
core/src/OC/notification.js Wyświetl plik

@@ -115,9 +115,18 @@ export default {
* @deprecated 17.0.0 use the `@nextcloud/dialogs` package
*/
show(text, options) {
const escapeHTML = function(text) {
return text.toString()
.split('&').join('&amp;')
.split('<').join('&lt;')
.split('>').join('&gt;')
.split('"').join('&quot;')
.split('\'').join('&#039;')
}

options = options || {}
options.timeout = (!options.timeout) ? TOAST_PERMANENT_TIMEOUT : options.timeout
const toast = showMessage(text, options)
const toast = showMessage(escapeHTML(text), options)
toast.toastElement.toastify = toast
return $(toast.toastElement)
},

Ładowanie…
Anuluj
Zapisz