From 69014e5fde0d7361e93d67d7d37ce0e0df42a6a0 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 26 Sep 2017 11:21:36 +0200 Subject: [PATCH] Fix mediatags in pad not cached --- www/pad/inner.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/www/pad/inner.js b/www/pad/inner.js index 517fcef5b..a3d9683e1 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -372,11 +372,9 @@ define([ var mediaMap = {}; var restoreMediaTags = function (tempDom) { - var pattern = /()<\/media-tag>/i; var tags = tempDom.querySelectorAll('media-tag:empty'); Cryptpad.slice(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);