File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
app/code/Magento/Sales/Helper
lib/internal/Magento/Framework Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ public function escapeHtmlWithLinks($data, $allowedTags = null)
166
166
167
167
$ internalErrors = libxml_use_internal_errors (true );
168
168
169
- $ data = mb_convert_encoding ($ data , 'HTML-ENTITIES ' , 'UTF-8 ' );
169
+ // $data = mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8');
170
170
$ domDocument ->loadHTML (
171
171
'<html><body id=" ' . $ wrapperElementId . '"> ' . $ data . '</body></html> '
172
172
);
@@ -192,7 +192,9 @@ public function escapeHtmlWithLinks($data, $allowedTags = null)
192
192
}
193
193
}
194
194
195
- $ result = mb_convert_encoding ($ domDocument ->saveHTML (), 'UTF-8 ' , 'HTML-ENTITIES ' );
195
+ // $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES');
196
+ $ result = html_entity_decode ($ domDocument ->saveHTML (), ENT_QUOTES , 'UTF-8 ' );
197
+
196
198
preg_match ('/<body id=" ' . $ wrapperElementId . '">(.+)<\/body><\/html>$/si ' , $ result , $ matches );
197
199
$ data = !empty ($ matches ) ? $ matches [1 ] : '' ;
198
200
}
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ function ($errorNumber, $errorString) {
97
97
}
98
98
);
99
99
$ data = $ this ->prepareUnescapedCharacters ($ data );
100
- $ string = mb_convert_encoding ($ data , 'HTML-ENTITIES ' , 'UTF-8 ' );
100
+ $ string = $ data ; // mb_convert_encoding($data, 'HTML-ENTITIES', 'UTF-8');
101
101
try {
102
102
$ domDocument ->loadHTML (
103
103
'<html><body id=" ' . $ wrapperElementId . '"> ' . $ string . '</body></html> '
@@ -114,7 +114,9 @@ function ($errorNumber, $errorString) {
114
114
$ this ->escapeText ($ domDocument );
115
115
$ this ->escapeAttributeValues ($ domDocument );
116
116
117
- $ result = mb_convert_encoding ($ domDocument ->saveHTML (), 'UTF-8 ' , 'HTML-ENTITIES ' );
117
+ // $result = mb_convert_encoding($domDocument->saveHTML(), 'UTF-8', 'HTML-ENTITIES');
118
+ $ result = html_entity_decode ($ domDocument ->saveHTML (), ENT_QUOTES , 'UTF-8 ' );
119
+
118
120
preg_match ('/<body id=" ' . $ wrapperElementId . '">(.+)<\/body><\/html>$/si ' , $ result , $ matches );
119
121
return !empty ($ matches ) ? $ matches [1 ] : '' ;
120
122
} else {
You can’t perform that action at this time.
0 commit comments