summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaspeter2012-10-04 00:12:02 (GMT)
committer Paris Liakos2012-10-04 00:12:02 (GMT)
commit278cb7ea7ec29aa4e02adffb9b347819ea554f6b (patch)
tree765df5419d23e87efcb2ee4c815a209c8d8afe36
parent79910147b2af445f0faab0fdb8018039ce25ad03 (diff)
Issue #1415568 by das_peter : Fix wysiwyg-media.js, detach fails when using application type files
-rw-r--r--js/wysiwyg-media.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/wysiwyg-media.js b/js/wysiwyg-media.js
index 97697f0..bbcaac0 100644
--- a/js/wysiwyg-media.js
+++ b/js/wysiwyg-media.js
@@ -169,7 +169,7 @@ Drupal.wysiwyg.plugins.media = {
// string. Using a regular expression instead of jQuery manipulation to
// prevent <script> tags from being displaced.
// @see http://drupal.org/node/1280758.
- if (matches = content.match(/<img[^>]+class=([\'"])media-image[^>]*>/gi)) {
+ if (matches = content.match(/<img[^>]+class=([\'"]media-image |[^>]*\smedia-image\s|[^>]*\smedia-image[\'"]|[\'"]media-image[\'"])[^>]*>/gi)) {
for (var i = 0; i < matches.length; i++) {
var imageTag = matches[i];
var inlineTag = Drupal.wysiwyg.plugins.media.createTag($(imageTag));