Skip to content

Commit 6a66569

Browse files
author
Jody McIntyre
committed
Remove html entity decoding from convertToSVG
This is unnecessary and imposes a performance hit on long strings.
1 parent 452a84e commit 6a66569

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib/svg_text_utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ function encodeForHTML(_str) {
252252
}
253253

254254
function convertToSVG(_str) {
255-
var htmlEntitiesDecoded = Plotly.util.html_entity_decode(_str);
256-
var result = htmlEntitiesDecoded
255+
var result = _str
257256
.split(/(<[^<>]*>)/).map(function(d) {
258257
var match = d.match(/<(\/?)([^ >]*)\s*(.*)>/i),
259258
tag = match && match[2].toLowerCase(),

0 commit comments

Comments
 (0)