vendor/assets/javascripts/aloha/lib/aloha/ephemera.js in locomotive-aloha-rails-0.23.2.1 vs vendor/assets/javascripts/aloha/lib/aloha/ephemera.js in locomotive-aloha-rails-0.23.2.2

- old
+ new

@@ -70,10 +70,11 @@ 'util/arrays', 'util/maps', 'util/dom2', 'util/functions', 'util/misc', + 'util/browser', 'PubSub' ], function ( $, Aloha, console, @@ -82,10 +83,11 @@ Arrays, Maps, Dom, Functions, Misc, + Browser, PubSub ) { 'use strict'; var ephemeraMap = { @@ -323,10 +325,15 @@ function pruneMarkedAttrs(elem) { var $elem = $(elem); var data = $elem.attr('data-aloha-ephemera-attr'); var i; var attrs; - $elem.removeAttr('data-aloha-ephemera-attr'); + // Because IE7 crashes if we remove this attribute. If the + // dom-to-xhtml plugin is turned on, it will handle the removal + // of this attribute during serialization. + if (!Browser.ie7) { + $elem.removeAttr('data-aloha-ephemera-attr'); + } if (typeof data === 'string') { attrs = Strings.words(data); for (i = 0; i < attrs.length; i++) { $elem.removeAttr(attrs[i]); }