()
| 575 | |
| 576 | |
| 577 | def test_svg_escape(): |
| 578 | fig = plt.figure() |
| 579 | fig.text(0.5, 0.5, "<\'\"&>", gid="<\'\"&>") |
| 580 | with BytesIO() as fd: |
| 581 | fig.savefig(fd, format='svg') |
| 582 | buf = fd.getvalue().decode() |
| 583 | assert '<'"&>"' in buf |
| 584 | |
| 585 | |
| 586 | @pytest.mark.parametrize("font_str", [ |