Skip to content

Commit e1a5852

Browse files
MC-36202: Support same site
- fix video
1 parent b0c57bf commit e1a5852

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/observable-updater/attributes.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/js/utils/directives.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/observable-updater/attributes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export default function generate(
4343
}
4444

4545
// Replacing src attribute with data-src to prevent img requests in iframe during master format rendering
46-
if (attributeConfig.name === "src" && Config.getMode() !== "Preview") {
47-
attributeData["data-" + attributeConfig.name] = value as string;
46+
if (attributeConfig.name === "src" && !value.indexOf("{{media url=") && Config.getMode() !== "Preview") {
47+
attributeData["data-tmp-" + attributeConfig.name] = value;
4848
// @ts-ignore
4949
Object.defineProperty(attributeData, attributeConfig.name, { get() { return value; } });
5050
} else {

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/utils/directives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function convertMediaDirectivesToUrls(html: string): string {
140140
*/
141141
export function replaceSrc(html: string): string {
142142
return html.replace(
143-
new RegExp("data-src=\"\{\{", "g"),
143+
new RegExp("data-tmp-src=\"\{\{", "g"),
144144
"src=\"{{",
145145
);
146146
}

0 commit comments

Comments
 (0)