Skip to content

Conversation

@stephanwlee
Copy link
Contributor

Graph is an overloaded word. Changed it to Chart.
Also fixed the malformed/unbalanced HTML tag.
@stephanwlee stephanwlee merged commit 3a63804 into tensorflow:master Nov 9, 2018
@stephanwlee stephanwlee deleted the svg branch November 9, 2018 18:57
@wchargin wchargin mentioned this pull request Mar 6, 2019
wchargin added a commit that referenced this pull request Mar 6, 2019
Summary:
This commit amends the comment added in #1601 per my subsequent
investigations. The generated SVG includes hash characters in the
`clip-path` attribute; Firefox interprets these as fragment specifiers,
truncating the SVG. The prior version of the comment speculated that the
issue was related to the length of the SVG, but there’s no evidence that
this is the case.

With this understanding, it’s easy to construct a [simple repro][1] to
confirm this behavior. In Firefox 61, a data-URI describing an SVG image
with a hash character is invalid in both an `img src` and an `a href`;
in Chrome 72, it’s fine in both. Firefox and Chrome also differ in their
handling of newlines in the non-encoded data-URI; Chrome includes the
newlines (except for the last one), while Firefox strips them.

[1]: https://gist.github.com/wchargin/f644d584ddafb19d003d46084c0f80e5

Test Plan:
No functional change. Inspect the above-linked gist to confirm behavior.

wchargin-branch: svg-url-truncation-comment
wchargin added a commit that referenced this pull request Mar 7, 2019
Summary:
This commit amends the comment added in #1601 per my subsequent
investigations. The generated SVG includes hash characters in the
`clip-path` attribute; Firefox interprets these as fragment specifiers,
truncating the SVG. The prior version of the comment speculated that the
issue was related to the length of the SVG, but there’s no evidence that
this is the case.

With this understanding, it’s easy to construct a [simple repro][1] to
confirm this behavior. In Firefox 61, a data-URI describing an SVG image
with a hash character is invalid in both an `img src` and an `a href`;
in Chrome pre-72, it’s fine in both, while Chrome 72 behaves the same as
Firefox. Firefox and Chrome also differ in their handling of newlines in
the non-encoded data-URI; Chrome includes the newlines (except for the
last one), while Firefox strips them.

[1]: https://gist.github.com/wchargin/f644d584ddafb19d003d46084c0f80e5

Test Plan:
No functional change. Inspect the above-linked gist to confirm behavior.

wchargin-branch: svg-url-truncation-comment
stephanwlee added a commit that referenced this pull request Mar 8, 2019
Data uri in the link for download has given us some trouble with
encoding and length limitations. We want to use the ObjectURL like
PR #1610 that is more durable to aforementioned limitations.

Related to #1601.
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.

2 participants