Deprecate the global DOMPurify
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
89d3b2cdd3
commit
db7cd7d5d8
|
@ -890,7 +890,7 @@ function Oe(e){return e.toString().split("&").join("&").split("<").join("<
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var je=function(){void 0===window.TESTING&&console.warn.apply(console,arguments)},ze=function(e,t){var n=e,i=function(){return je("The ".concat(t," library is deprecated! It will be removed in nextcloud 19.")),n.apply(this,arguments)};return Object.assign(i,n),i},Fe=function(e,t,n){void 0!==window[e]&&delete window[e],Object.defineProperty(window,e,{get:function(){return je(n?"".concat(e," is deprecated: ").concat(n):"".concat(e," is deprecated")),t()}})};window._=d.a,window.$=l.a,window.autosize=w.a,window.Backbone=x.a,window.Clipboard=A.a,window.ClipboardJS=A.a,window.cssVars=se,window.dav=ae.a,window.DOMPurify=ce.a,window.Handlebars=de.a,window.jstimezonedetect=pe.a,window.jstz=pe.a,window.jQuery=l.a,window.marked=ze(me.a,"marked"),window.md5=_e.a,window.moment=p.a,window.OC=c.a,Fe("initCore",(function(){return y}),"this is an internal function"),Fe("oc_appswebroots",(function(){return c.a.appswebroots}),"use OC.appswebroots instead"),Fe("oc_capabilities",c.a.getCapabilities,"use OC.getCapabilities instead"),Fe("oc_config",(function(){return c.a.config}),"use OC.config instead"),Fe("oc_current_user",(function(){return c.a.getCurrentUser().uid}),"use OC.getCurrentUser().uid instead"),Fe("oc_debug",(function(){return c.a.debug}),"use OC.debug instead"),Fe("oc_defaults",(function(){return c.a.theme}),"use OC.theme instead"),Fe("oc_isadmin",c.a.isUserAdmin,"use OC.isUserAdmin() instead"),Fe("oc_requesttoken",(function(){return Object(m.a)()}),"use OC.requestToken instead"),Fe("oc_webroot",(function(){return c.a.webroot}),"use OC.getRootPath() instead"),Fe("OCDialogs",(function(){return c.a.dialogs}),"use OC.dialogs instead"),window.OCP=He,window.OCA=Pe.a,window.escapeHTML=ze(Oe,"escapeHTML"),window.formatDate=ze((function(e){return console.warn("formatDate is deprecated, use OC.Util.formatDate instead"),c.a.Util.formatDate(e)}
|
||||
var je=function(){void 0===window.TESTING&&console.warn.apply(console,arguments)},ze=function(e,t){var n=e,i=function(){return je("The ".concat(t," library is deprecated! It will be removed in nextcloud 19.")),n.apply(this,arguments)};return Object.assign(i,n),i},Fe=function(e,t,n){void 0!==window[e]&&delete window[e],Object.defineProperty(window,e,{get:function(){return je(n?"".concat(e," is deprecated: ").concat(n):"".concat(e," is deprecated")),t()}})};window._=d.a,window.$=l.a,window.autosize=w.a,window.Backbone=x.a,window.Clipboard=A.a,window.ClipboardJS=A.a,window.cssVars=se,window.dav=ae.a,Fe("DOMPurify",(function(){return ce.a}),"The global DOMPurify is deprecated, ship your own"),window.Handlebars=de.a,window.jstimezonedetect=pe.a,window.jstz=pe.a,window.jQuery=l.a,window.marked=ze(me.a,"marked"),window.md5=_e.a,window.moment=p.a,window.OC=c.a,Fe("initCore",(function(){return y}),"this is an internal function"),Fe("oc_appswebroots",(function(){return c.a.appswebroots}),"use OC.appswebroots instead"),Fe("oc_capabilities",c.a.getCapabilities,"use OC.getCapabilities instead"),Fe("oc_config",(function(){return c.a.config}),"use OC.config instead"),Fe("oc_current_user",(function(){return c.a.getCurrentUser().uid}),"use OC.getCurrentUser().uid instead"),Fe("oc_debug",(function(){return c.a.debug}),"use OC.debug instead"),Fe("oc_defaults",(function(){return c.a.theme}),"use OC.theme instead"),Fe("oc_isadmin",c.a.isUserAdmin,"use OC.isUserAdmin() instead"),Fe("oc_requesttoken",(function(){return Object(m.a)()}),"use OC.requestToken instead"),Fe("oc_webroot",(function(){return c.a.webroot}),"use OC.getRootPath() instead"),Fe("OCDialogs",(function(){return c.a.dialogs}),"use OC.dialogs instead"),window.OCP=He,window.OCA=Pe.a,window.escapeHTML=ze(Oe,"escapeHTML"),window.formatDate=ze((function(e){return console.warn("formatDate is deprecated, use OC.Util.formatDate instead"),c.a.Util.formatDate(e)}
|
||||
/*
|
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -107,7 +107,7 @@ window['Clipboard'] = ClipboardJS
|
|||
window['ClipboardJS'] = ClipboardJS
|
||||
window['cssVars'] = cssVars
|
||||
window['dav'] = dav
|
||||
window['DOMPurify'] = DOMPurify
|
||||
setDeprecatedProp('DOMPurify', () => DOMPurify, 'The global DOMPurify is deprecated, ship your own')
|
||||
window['Handlebars'] = Handlebars
|
||||
window['jstimezonedetect'] = jstimezonedetect
|
||||
window['jstz'] = jstimezonedetect
|
||||
|
|
Loading…
Reference in New Issue