Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a1bc03

Browse files
tacaswellQuLogic
authored andcommitted
FIX: don't repr the figure numbers
Otherwise the quotes get escaped during the templating process which results in invalid html/js being served.
1 parent 5356ef0 commit 4a1bc03

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/matplotlib/backends/web_backend/all_figures.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
};
3636

3737
{% for (fig_id, fig_manager) in figures %}
38-
ready(figure_ready({{ repr(str(fig_id)) }}));
38+
ready(figure_ready({{ str(fig_id) }}));
3939
{% end %}
4040
</script>
4141

lib/matplotlib/backends/web_backend/single_figure.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
function () {
2222
var websocket_type = mpl.get_websocket_type();
2323
var websocket = new websocket_type(
24-
"{{ ws_uri }}" + {{ repr(str(fig_id)) }} + "/ws");
24+
"{{ ws_uri }}" + {{ str(fig_id) }} + "/ws");
2525
var fig = new mpl.figure(
26-
{{repr(str(fig_id))}}, websocket, mpl_ondownload,
26+
{{ str(fig_id) }}, websocket, mpl_ondownload,
2727
document.getElementById("figure"));
2828
}
2929
);

0 commit comments

Comments
 (0)