dompdf / php-svg-lib

SVG file parsing / rendering library
GNU Lesser General Public License v3.0
1.4k stars 77 forks source link

Support (non-visible) desc attribute #31

Closed barryvdh closed 6 years ago

barryvdh commented 6 years ago

Prevents 'Unknown: desc' when using the desc tag. See https://developer.mozilla.org/en-US/docs/Web/SVG/Element/desc

Each container element or graphics element in an SVG drawing can supply a description string using the element where the description is text-only. When the current SVG document fragment is rendered as SVG on visual media, elements are not rendered as part of the graphics. [..]

We don't need to render it, but avoid the echo of invalid tag (which should probably trigger an exception/warning instead of echo?)

PhenX commented 6 years ago

You are right about the echo, it was used for the debugging tool that was in the project some time ago, but not used anymore

barryvdh commented 6 years ago

Should I make a PR to remove the echo? In that case we don't need special cases for desc and perhaps others

PhenX commented 6 years ago

Thanks for the proposition, I just removed it :)