From 4a625aa67810fa4eab96b644bb05c5c14ab24521 Mon Sep 17 00:00:00 2001 From: dennischan <48424802+dennischancs@users.noreply.github.com> Date: Mon, 7 Mar 2022 18:07:36 +0800 Subject: [PATCH] fix bug Escaped character '\s' is not valid. See 'doc sprintf' --- plotly/plotly_offline_aux/plotlyoffline.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/plotly_offline_aux/plotlyoffline.m b/plotly/plotly_offline_aux/plotlyoffline.m index 21444a10..d9dca9e6 100644 --- a/plotly/plotly_offline_aux/plotlyoffline.m +++ b/plotly/plotly_offline_aux/plotlyoffline.m @@ -80,7 +80,7 @@ % save the html file in the working directory plotlyOfflineFile = fullfile(plotlyfig.PlotOptions.SaveFolder, htmlFilename); fileID = fopen(plotlyOfflineFile, 'w'); - fprintf(fileID, offlineScript); + fprintf(fileID, '%s', offlineScript); fclose(fileID); % remove any whitespace from the plotlyOfflineFile path