Skip to content

Conversation

@L33TSP34KER
Copy link

ui_lib

This is a library designed to generate SVG on-the-fly or at runtime. Now, users can create dynamic SVGs using this library more easily and with greater flexibility. Here's an example usage:

But like Guillaume said, you can inject JavaScript, but this isn't a security flaw of the library; rather, it's related to Gnoweb.
because anyone can simply create an SVG with JavaScript and make an Realm, regardless of my library

example

func Render() string {
	canvas := svg.NewSvgCanvas(400, 200, "300,200,400,400", "", nil,
		svg.NewSvgCircle(100, 100, 50, "#FF0000", "", nil),
		svg.NewSvgRect(150, 150, 100, 80, 10, "#00FF00", "example-class", svg.NewSvgCircle(100, 100, 50, "#FF0000", "", nil)),
	)

	return canvas.Render()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant