orca
orca copied to clipboard
Ampersands don't render in annotations of .emf files if " " is used in other text elements
If I input a json that uses in title text using the below command, the & doesn't appear in annotations in .emf files (all other image types seem to work)
docker run -it -d -p 9091:9091 quay.io/plotly/image-exporter:4.1.0b642
curl -d @minimal-no-ampersand.json -H "accept: image/emf" localhost:9091 -o minimal-no-ampersand.emf
where minimal-no-ampersand.json looks like this
{
"layout": {
"yaxis": {
"title": {
"font": {
"size": 11
},
"text": "%{meta[1]} "
}
},
"meta": [
"Stacked Bar Chart Title",
"A&W Hamburgers",
"Y-axis label",
"X-axis label",
"A&W Hamburgers"
],
"annotations": [
{
"text": "%{meta[4]} ",
"align": "left",
"xanchor": "left",
"xref": "paper",
"yref": "paper"
}
]
}
}

but this works (I just removed the from the yaxis title text):
{
"layout": {
"yaxis": {
"title": {
"font": {
"size": 11
},
"text": "%{meta[1]}"
}
},
"meta": [
"Stacked Bar Chart Title",
"A&W Hamburgers",
"Y-axis label",
"X-axis label",
"A&W Hamburgers"
],
"annotations": [
{
"text": "%{meta[4]} ",
"align": "left",
"xanchor": "left",
"xref": "paper",
"yref": "paper"
}
]
}
}
cc @plotly/techops
Looks like a bug to me. @wbrgss can you please assign someone to investigate?