manual merge of staging into framework

This commit is contained in:
Caleb James DeLisle
2017-09-26 17:11:45 +02:00
7 changed files with 17 additions and 38 deletions

View File

@@ -365,11 +365,9 @@ define([
var mediaMap = {};
var restoreMediaTags = function (tempDom) {
var pattern = /(<media-tag contenteditable="false" data-crypto-key="([^"]*)" src="([^"]*)" tabindex="1">)<\/media-tag>/i;
var tags = tempDom.querySelectorAll('media-tag:empty');
Array.prototype.slice.call(tags).forEach(function (tag) {
if (pattern.length !== 4) { return; }
var src = pattern[3];
var src = tag.getAttribute('src');
if (mediaMap[src]) {
mediaMap[src].forEach(function (n) {
tag.appendChild(n);