changeset ddf3530e83e7 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=ddf3530e83e7
description:
        Restore htmlPrefilter of jQuery < 3.5

        fullcalendar does not support yet jQuery 3.5 because of the 
htmlPrefilter
        security change. So we restore the previous behavior until
        https://github.com/fullcalendar/fullcalendar/pull/5391 is merged and 
released.

        issue9293
        review303501002
diffstat:

 src/sao.js |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r d385870438b4 -r ddf3530e83e7 src/sao.js
--- a/src/sao.js        Sat May 02 10:29:26 2020 +0200
+++ b/src/sao.js        Mon May 04 10:21:23 2020 +0200
@@ -5,6 +5,14 @@
 (function() {
     'use strict';
 
+    // Restore htmlPrefilter of jQuery < 3.5
+    // To be removed when
+    // https://github.com/fullcalendar/fullcalendar/pull/5391 is merged
+    var rxhtmlTag = 
/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi;
+    jQuery.htmlPrefilter = function( html ) {
+        return html.replace( rxhtmlTag, "<$1></$2>" );
+    };
+
     // Browser compatibility: polyfill
     if (!('contains' in String.prototype)) {
         String.prototype.contains = function(str, startIndex) {

Reply via email to