Re: [PATCH 0/3] SVG terminal enhancements: Title, Description, and Escaping

Ethan A Merritt <[email protected]> Sun, 13 Apr 2025 23:29:47 -0700
Newsgroups gmane.comp.graphics.gnuplot.devel
Organization University of Washington
Message-ID <5296604.mvXUDI8C0e@stonelion>
On Friday, 11 April 2025 21:02:54 PDT Fredrick R. Brennan wrote:
> Hello Gnuplot developers,
> 
> This patch series introduces three small enhancements for the SVG 
> terminal driver aimed at improving metadata, accessibility, and 
> robustness of the generated output.

Applied. Thanks.

> 
> Patch 1/3 ([svg] add &gt; for > in ENHsvg_writec):
> This patch improves enhanced text handling by escaping the > character 
> to &gt;. This prevents rendering issues and XML errors in viewers like 
> Firefox when labels contain this character.
>
> Patch 2/3 ([svg] add plot title to XML <title>):
> This patch makes the SVG <title> element more meaningful, resolving a 
> TODO in the source code. It now uses the Gnuplot plot title (set title) 
> if one is defined, falling back to the name set via set term svg name 
> "...", and finally to "Gnuplot" as a default.
> 
> To handle potentially complex title strings correctly within XML, this 
> patch also introduces a helper function, SVG_put_CDATA, which correctly 
> embeds text within <![CDATA[...]]> sections, including the necessary 
> escaping for the forbidden ]]> sequence.
> 
> Patch 3/3 ([svg] add ability for user to set XML <desc>):
> This patch introduces a new terminal option description "<text>". If 
> this option is used, the provided text is embedded in the SVG <desc> 
> element, allowing users to easily add descriptive metadata or 
> accessibility information to their plots. This patch reuses the 
> SVG_put_CDATA helper function introduced in Patch 2 and includes 
> documentation for the new option in the terminal help.
> 
> These changes should apply cleanly to the current master branch. Patch 3 
> relies on a function introduced in Patch 2.
> 
> Feedback welcome!
> 
> 
> ------------------------------------------------------------------------
> 
> Best,
> Fred Brennan
> 
> |[[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
> 
> GnuPG: 98F2 8F76 7470 129F BE3B 054C E215 4DD1 A1C7 7B8B
> BlueSky: @copypaste.bsky.social
> Personal website: <https://ctrlcctrlv.github.io/>
> 
> 
> 


-- 
Ethan A Merritt
Department of Biochemistry
University of Washington, Seattle




_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta