File tree Expand file tree Collapse file tree 5 files changed +15
-4
lines changed
Cms/view/adminhtml/templates/browser
lib/internal/Magento/Framework/View Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 20
20
<div class="title"><?php /* @escapeNotVerified */ echo $ block ->getHeaderText () ?> </div>
21
21
</div>
22
22
</div>
23
+ <div id="error-message" data-action="show-error"></div>
23
24
<div id="contents-uploader" class="contents-uploader"><?php echo $ block ->getChildHtml ('wysiwyg_images.uploader ' ) ?> </div>
24
25
<div id="contents"></div>
25
26
</div>
Original file line number Diff line number Diff line change @@ -69,10 +69,16 @@ require([
69
69
},
70
70
done: function (e, data) {
71
71
var progressSelector = '#' + data.fileId + ' .progressbar-container .progressbar';
72
+ var tempErrorMessage = document.createElement("div");
72
73
$(progressSelector).css('width', '100%');
74
+ $('[data-action="show-error"]').children(".message").remove();
73
75
if (data.result && !data.result.hasOwnProperty('errorcode')) {
74
76
$(progressSelector).removeClass('upload-progress').addClass('upload-success');
75
77
} else {
78
+ tempErrorMessage.className = "message message-warning warning";
79
+ tempErrorMessage.innerHTML = data.result.error;
80
+
81
+ $('[data-action="show-error"]').append(tempErrorMessage);
76
82
$(progressSelector).removeClass('upload-progress').addClass('upload-failure');
77
83
}
78
84
},
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request)
134
134
$ this ->_setResponseBody ($ responseBody );
135
135
} else if ($ this ->_isWsdlListRequest ()) {
136
136
$ servicesList = [];
137
- foreach (array_keys ( $ this ->_wsdlGenerator ->getListOfServices () ) as $ serviceName ) {
137
+ foreach ($ this ->_wsdlGenerator ->getListOfServices () as $ serviceName ) {
138
138
$ servicesList [$ serviceName ]['wsdl_endpoint ' ] = $ this ->_soapServer ->getEndpointUri ()
139
139
. '? ' . \Magento \Webapi \Model \Soap \Server::REQUEST_PARAM_WSDL . '&services= ' . $ serviceName ;
140
140
}
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ public function minify($file)
131
131
'#(?<!:| \\\\| \'|")//(?!\s*\<\!\[)(?!\s*]]\>)[^\n\r]*# ' ,
132
132
'' ,
133
133
preg_replace (
134
- '#(?<!:)//[^\n\r]*(\s\?\>)# ' ,
134
+ '#(?<!:| \' |" )//[^\n\r]*(\s\?\>)# ' ,
135
135
'$1 ' ,
136
136
preg_replace (
137
137
'#(?<!:)//[^\n\r]*(\<\?php)[^\n\r]*(\s\?\>)[^\n\r]*# ' ,
Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ public function testMinify()
124
124
<head>
125
125
<title>Test title</title>
126
126
</head>
127
+ <link rel="stylesheet" href='https://www.example.com/2' type="text/css" />
128
+ <link rel="stylesheet" type="text/css" media="all" href="https://www.example.com/1" type="text/css" />
127
129
<body>
128
130
<a href="http://somelink.com/text.html">Text Link</a>
129
131
<img src="test.png" alt="some text" />
@@ -149,14 +151,16 @@ public function testMinify()
149
151
//]]>
150
152
</script>
151
153
<?php echo "http://some.link.com/" ?>
154
+ <?php echo "//some.link.com/" ?>
155
+ <?php echo '//some.link.com/' ?>
152
156
<em>inline text</em>
153
157
<a href="http://www.<?php echo 'hi' ?>"></a>
154
158
</body>
155
159
</html>
156
160
TEXT ;
157
161
158
162
$ expectedContent = <<<TEXT
159
- <?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ ?> <?php ?> <html><head><title>Test title</title></head><body><a href="http://somelink.com/text.html">Text Link</a> <img src="test.png" alt="some text" /><?php echo \$block->someMethod(); ?> <div style="width: 800px" class="<?php echo \$block->getClass() ?>" /><script>
163
+ <?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ ?> <?php ?> <html><head><title>Test title</title></head><link rel="stylesheet" href='https://www.example.com/2' type="text/css" /><link rel="stylesheet" type="text/css" media="all" href="https://www.example.com/1" type="text/css" />< body><a href="http://somelink.com/text.html">Text Link</a> <img src="test.png" alt="some text" /><?php echo \$block->someMethod(); ?> <div style="width: 800px" class="<?php echo \$block->getClass() ?>" /><script>
160
164
var i = 1;
161
165
var j = 1;
162
166
@@ -174,7 +178,7 @@ public function testMinify()
174
178
}
175
179
});
176
180
//]]>
177
- </script><?php echo "http://some.link.com/" ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a></body></html>
181
+ </script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> < em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a></body></html>
178
182
TEXT ;
179
183
180
184
$ this ->appDirectoryMock ->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments