Menu ▾ ▴

#2858 gnuplot_svg.js cannot create JSON with settings

None
closed-cannot-reproduce
nobody
JavaScript (1)
6 days ago
2026-02-17
Anonymous
No

If an SVG file with mouse is created, embedded into a web page and then opened in a browser, parseSettings() in gnuplot_svg() in gnuplot_svg.js tries to convert the commented JavaScript with statements line gnuplot_svg.setting = (value); into JSON.

However, the comment fragment contains more newlines than expected and after all regexes are applied has double commas, commas in the beginning and commas in the end; causing JSON.parse() to fail, breaking all subsequent JavaScript.

I would like to submit a patch fixing this, and for this purpose creating this bug.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2026-02-20

    I am not able to reproduce this. Is your browser not able to display the SVG on-line demos?
    https://gnuplot.sourceforge.net/demo_svg_6.0/

    What O/S and browser are you using?
    I would be happy to look a patch, but it will be hard to test and evaluate if I can't reproduce the problem.

     
  • Ethan Merritt

    Ethan Merritt - 6 days ago
    • status: open --> closed-cannot-reproduce
    • Group: -->
    • Priority: -->
     

Log in to post a comment.