mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
Merge pull request #25234 from nextcloud/bugfix/noid/fix-encoding-issue-with-oc.notification.show
Fix encoding issue with OC.Notification.show
This commit is contained in:
commit
3478f39c0c
5 changed files with 14 additions and 5 deletions
2
core/js/dist/login.js
vendored
2
core/js/dist/login.js
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/login.js.map
vendored
2
core/js/dist/login.js.map
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/main.js
vendored
2
core/js/dist/main.js
vendored
File diff suppressed because one or more lines are too long
2
core/js/dist/main.js.map
vendored
2
core/js/dist/main.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -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('&')
|
||||
.split('<').join('<')
|
||||
.split('>').join('>')
|
||||
.split('"').join('"')
|
||||
.split('\'').join(''')
|
||||
}
|
||||
|
||||
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)
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue