File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
app/code/Magento/PageBuilder Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -209,7 +209,18 @@ public function getMetadata($key = null)
209
209
*/
210
210
public function stripHtmlWrapperTags (): string
211
211
{
212
- preg_match ('/<body>(.*)<\/body>/ ' , $ this ->getContents (), $ matches );
213
- return isset ($ matches [1 ]) ? $ matches [1 ] : '' ;
212
+ $ result = '' ;
213
+ preg_match ('/<body>(.*)<\/body>/s ' , $ this ->saveHTML (), $ matches );
214
+
215
+ if (isset ($ matches [1 ])) {
216
+ $ result = preg_replace_callback (
217
+ '/=\"(%7B%7B[^"]*%7D%7D)\"/m ' ,
218
+ function ($ matches ) {
219
+ return urldecode ($ matches [0 ]);
220
+ },
221
+ $ matches [1 ]
222
+ );
223
+ }
224
+ return $ result ;
214
225
}
215
226
}
Original file line number Diff line number Diff line change @@ -50,6 +50,6 @@ public function convert($value)
50
50
$ innerDiv = $ row ->querySelector (".row-full-width-inner " );
51
51
$ innerDiv ->addStyle ("padding " , $ padding );
52
52
}
53
- return $ fullWidthRows ->count () > 0 ? $ document ->stripHtmlWrapperTags () : $ value ;
53
+ return $ fullWidthRows ->count () > 0 ? ( $ document ->stripHtmlWrapperTags () ?: $ value ) : $ value ;
54
54
}
55
55
}
You can’t perform that action at this time.
0 commit comments