Title: Fix alt and caption handling in Sphinx directives by QuLogic · Pull Request #29689 · matplotlib/matplotlib · GitHub
Open Graph Title: Fix alt and caption handling in Sphinx directives by QuLogic · Pull Request #29689 · matplotlib/matplotlib
X Title: Fix alt and caption handling in Sphinx directives by QuLogic · Pull Request #29689 · matplotlib/matplotlib
Description: PR summary We currently template new reST to be re-parsed after the plot is created, but incorrectly copied the alt and caption values when they were wrapped. In the future, we should probably drop this template and directly create the nodes we need, but I assume that TEMPLATE is not private right now for the purpose of letting people modify it. Additionally, change figmpl to use Sphinx/docutils' tag creation functions. These functions correctly escape attributes and so fixes invalid HTML when alt text contains quotes. I also dropped some attributes if they were empty (e.g., we no longer get style="" class="" if those aren't specified.) For example, this is broken on the dark colour map image which has quoted colour map names in the alt text. Fixes #29649 PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested [n/a] Plotting related features are demonstrated in an example [n/a] New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: PR summary We currently template new reST to be re-parsed after the plot is created, but incorrectly copied the alt and caption values when they were wrapped. In the future, we should probably drop...
X Description: PR summary We currently template new reST to be re-parsed after the plot is created, but incorrectly copied the alt and caption values when they were wrapped. In the future, we should probably drop...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/29689
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6200e402-0944-b540-0086-2c70ad948d55 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E490:1B00D1:17C0CD2:1F708C2:6A51CDD8 |
| html-safe-nonce | f5b033971993856d23722380ced44e2e03534abf181c65ad07edcc01a8d00ff8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDkwOjFCMDBEMToxN0MwQ0QyOjFGNzA4QzI6NkE1MUNERDgiLCJ2aXNpdG9yX2lkIjoiODY2NjY5MjEyMzI4OTA0NjQ4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6738d76d193738addcf276540a6675892b2b32dca3fb37f3d9506cb5ab6a2421 |
| hovercard-subject-tag | pull_request:2362981715 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/29689/files |
| twitter:image | https://avatars.githubusercontent.com/u/302469?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/302469?s=400&v=4 |
| og:image:alt | PR summary We currently template new reST to be re-parsed after the plot is created, but incorrectly copied the alt and caption values when they were wrapped. In the future, we should probably drop... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width