Эх сурвалжийг харах

HUE-7743 [frontend] Also adapt img src urls in embedded mode

Johan Ahlen 8 жил өмнө
parent
commit
b1700d6

+ 7 - 0
desktop/core/src/desktop/templates/hue.mako

@@ -882,6 +882,13 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
             $(this).attr('href', link);
           });
 
+          if (typeof adaptHueEmbeddedUrls !== 'undefined') {
+            $rawHtml.find('img[src]').each(function () {
+              var $img = $(this);
+              $img.attr('src', adaptHueEmbeddedUrls($img.attr('src')));
+            })
+          }
+
           $rawHtml.unwrap('<span>');
           scriptsPromise.done(function () {
             promise.resolve($rawHtml);