Projet

Général

Profil

Révision 2b3c8cc1

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media/modules/media_wysiwyg/js/media_wysiwyg.format_form.js
42 42
      field.name = field.name.replace(/\[format\]/i, '[value]');
43 43
      field.key  = 'edit-' + field.name.replace(/[_\[]/g, '-').replace(/[\]]/g, '');
44 44

  
45
      if (Drupal.wysiwyg.instances[field.key]) {
45
      if (Drupal.wysiwyg && Drupal.wysiwyg.instances[field.key]) {
46 46
        // Retrieve the content from the WYSIWYG instance.
47 47
        ret[field.name] = Drupal.wysiwyg.instances[field.key].getContent();
48 48

  
49
        // Escape the double-quotes and encode it to play nicely within JSON.
50
        ret[field.name] = encodeURIComponent(ret[field.name].replace(/"/g, '\\"'));
49
        // Encode the content to play nicely within JSON.
50
        ret[field.name] = encodeURIComponent(ret[field.name]);
51 51
      }
52 52
    }
53 53
  });

Formats disponibles : Unified diff