- Fix marker path scale
WARNING: this is a security update.
When processing SVG files, CairoSVG was using two regular expressions which are vulnerable to Regular Expression Denial of Service (REDoS).
If an attacker provided a malicious SVG, it could make CairoSVG get stuck processing the file for a very long time.
Other bug fixes:
- Fix marker positions for unclosed paths
- Follow hint when only output_width or output_height is set
- Handle opacity on raster images
- Don’t crash when use tags reference unknown tags
- Take care of the next letter when A/a is replaced by l
- Fix misalignment in node.vertices
- Drop support of Python 3.5, add support of Python 3.9.
- Add EPS export
- Add background-color, negate-colors, and invert-images options
- Improve support for font weights
- Fix opacity of patterns and gradients
- Support auto-start-reverse value for orient
- Draw images contained in defs
- Add Exif transposition support
- Handle dominant-baseline
- Support transform-origin
- Fix race condition in tests
- Fix scale for images with no viewBox
- Fix the --scale parameter
- Allow href attributes with no namespace
- Fix the tree root detection
- Fix aspect and position when resizing root SVG tag
- Follow aspect and position hints when using forced output size
- Fix relative paths on Windows
- Drop Python 3.4 support
- Make text selectable on generated PDF files
- Don't inherit dx and dy attributes
- Fix support of alignment-baseline="hanging"
- Fix backslashes in docstrings and comments
- Fix local anchors with files with no given URL
- Close VERSION's file descriptor
- Clean packaging
- Include LICENSE in distributed packages
- Fix packaging
- Clean packaging
- Fix T commands used with previous relative commands in paths
- Use real functions for svg2* commands, improving IDE integration
- Fix files management on Windows
- Handle image-rendering property
- Fix crash with some text samples
- Fix position of embedded svg tags with a viewbox not at position (0, 0)
- Add output-width and output-height options
- Handle references to inner document tags defined after the anchor
- Fix offsets for texts on paths
- Fix T commands following q or t in paths
- Fix font-size
- Use http://www.w3.org/2000/svg as default namespace
- Use cssselect2 and tinycss2 instead of cssselect and tinycss
- Don't require lxml anymore
- Rely on defusedxml to detect unsafe SVG files
- Add
python_requires
insetup.py
- Handle
text-align
in textPath tags - Test with Python 3.6
- Don't crash on relative refs with no input URL
- Drop Python 2 support
- Drop pycairo support
- Rely on cairocffi, lxml, cssselect, pillow and tinycss
- Fix markers
- Fix URL/id handling
- Use bounding boxes for gradients
- Split deployment and development tests
- Add a scale option
- Add a parent size option
- Test with Travis
- Fix crash when lxml is not installed
WARNING: this is a security update.
CairoSVG was vulnerable to XML eXternal Entity (XXE) attacks, this release fixes this vulnerability by not resolving the XML entities anymore.
The --unsafe
option has been added to force the resolution of XML
entities. Obviously, this option is not safe and should only be used with
trusted SVG files.
- Allow the user to give parent size
- Drastically improve the performance of
Node()
- Use cairo groups to apply filters
- Fix scale and position of markers
- Support the text-rendering property
- Use xMidYMid as default preserveAspectRatio value
- Support the shape-rendering property
- Fix end markers
- Don't crash when paths with markers end with a move_to action
- Allow commas in viewboxes
- Allow quotes around font names
- Don't crash when gradients are applied to paths
- Don't create an atomic layer for transparent tags with no children
- Fix scaling with negative viewBox origin
- Automatically detect size and position of circles and ellipses for gradients
- Fall back to pycairo if cairocffi is unable to find the cairo library
- Don't inherit clip* and overflow properties
- Don't transform the root svg tag according to the PreservAspectRatio attribute
- Add simple support for alignment-baseline
- Add cairocffi into setup.py deps
- Clear relative coordinates when absolute coordinates are set in tspan tags
- Fix clips and viewboxes
- Don't draw an empty image when locale is not set
- Don't crash when locale is not set
- Get the xml_tree from the root parent when creating nodes from string
- Don't crash when svg tag has no width or height
- CairoCFFI support
- Support of more external CSS stylesheets
- Handle more filters
- Use pillow instead of pystacia
- Fix a lot of bugs with text (whitespaces, text on a path, etc.)
- Inherit attributes in
use
tags - Cache trees for
use
tags - Handle conditional structures
- Simple support of the
image
tag thanks to pystacia - Better tests with pystacia instead of pypng (~35% faster)
- Handle s after C/S and S after c/s in paths
- Handle rounded corners with 2 different radii for rectangles
- Fix python 2.6 support
- Fix markers with empty paths and z/Z points
- Fix initial m in paths with no current point
- Fix transformations order
- Use a default font size of 12pt
- Fix a bug about non-invertible matrices
- Fix the installation for python 3 with LANG=C
- Fix the version detection without cairo
- Don't rely on cairo import to find the version
- Use cssselect
- Reliable testing suite
- Use tinycss instead of cssutils to parse CSS
- Percentages, em and ex units
- Real opacity
- Simple inline CSS support
- Support for transformations in patterns and gradients
- Real by-surface DPI management (default value set to 96)
- Handle exponents
- Change the Python API again to be compatible with 0.1.1 and before:
svg2pdf(source_as_bytes) -> bytes
but still support filenames or file objects with keyword-only parameters. See the docstrings. - Add support for
display
,visibility
,stop-opacity
andstroke-miterlimit
- Internal refactoring
Backward incompatible change in the Python API: previously the input could be either a filename or SVG content as a string. Now a string is always interpreted as a filename, but file-like objects are also accepted. Use a StringIO object if you have SVG content in a string.
Fix Python 2.6 compatibility.
- First release
- PDF, PS and PNG export
- Easy installer