Title: [Bug]: Infinite loop when there is single double quote in matplotlibrc · Issue #22636 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Infinite loop when there is single double quote in matplotlibrc · Issue #22636 · matplotlib/matplotlib
X Title: [Bug]: Infinite loop when there is single double quote in matplotlibrc · Issue #22636 · matplotlib/matplotlib
Description: Bug summary This code https://github.com/timhoffm/matplotlib/blob/7c378a8f3f30ce57c874a851f3af8af58f1ffdf6/lib/matplotlib/cbook/__init__.py#L403-L415 on the main branch (not released yet) falls into an infinite loop when there is only on...
Open Graph Description: Bug summary This code https://github.com/timhoffm/matplotlib/blob/7c378a8f3f30ce57c874a851f3af8af58f1ffdf6/lib/matplotlib/cbook/__init__.py#L403-L415 on the main branch (not released yet) falls int...
X Description: Bug summary This code https://github.com/timhoffm/matplotlib/blob/7c378a8f3f30ce57c874a851f3af8af58f1ffdf6/lib/matplotlib/cbook/__init__.py#L403-L415 on the main branch (not released yet) falls int...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/22636
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Infinite loop when there is single double quote in matplotlibrc","articleBody":"### Bug summary\r\n\r\nThis code https://github.com/timhoffm/matplotlib/blob/7c378a8f3f30ce57c874a851f3af8af58f1ffdf6/lib/matplotlib/cbook/__init__.py#L403-L415 on the main branch (not released yet) falls into an infinite loop when there is only one double quotation because when `s.find('\"', quote_pos + 1) == -1` `pos == 0`\r\n\r\ncontext:\r\n- https://github.com/matplotlib/matplotlib/pull/22589\r\n- https://github.com/matplotlib/matplotlib/issues/19288\r\n\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nfrom pathlib import Path\r\n\r\nimport matplotlib.pyplot as plt\r\n\r\nPath(\"./test.mplstyle\").write_text('grid.color: \"aa')\r\nplt.style.use(\"./test.mplstyle\")\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\nThe program doesn't exit.\r\n\r\n### Expected outcome\r\n\r\nShow an error or set `'\"aa'`.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\n_No response_\r\n\r\n### Matplotlib Version\r\n\r\n3.6.0.dev1816+gb9ae51ca8c.d20220311\r\n\r\n### Matplotlib Backend\r\n\r\n_No response_\r\n\r\n### Python version\r\n\r\nPython 3.10.0\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\n_No response_","author":{"url":"https://github.com/yy0931","@type":"Person","name":"yy0931"},"datePublished":"2022-03-11T13:29:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/22636/matplotlib/issues/22636"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bc1ae321-4ca1-2aae-0db9-ceb54520789b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4AE:15F1A6:1F80305:2A6544A:6A53743A |
| html-safe-nonce | 4b80c9e37335d277d66ae0160765ceff435e74fac53b68599644682297e66eb0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEFFOjE1RjFBNjoxRjgwMzA1OjJBNjU0NEE6NkE1Mzc0M0EiLCJ2aXNpdG9yX2lkIjoiODg4NTUwNzIxMjIzMzExMDU4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | aab6f23950efc479d5692d84968cd831a4e5fa7bf8ba1c480947c7798a503a08 |
| hovercard-subject-tag | issue:1166418710 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/matplotlib/matplotlib/22636/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5fc1a39b9e0668f44271fe94c22b3f1bb5da96774e8c9da8b82f3470aba420fe/matplotlib/matplotlib/issues/22636 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5fc1a39b9e0668f44271fe94c22b3f1bb5da96774e8c9da8b82f3470aba420fe/matplotlib/matplotlib/issues/22636 |
| og:image:alt | Bug summary This code https://github.com/timhoffm/matplotlib/blob/7c378a8f3f30ce57c874a851f3af8af58f1ffdf6/lib/matplotlib/cbook/__init__.py#L403-L415 on the main branch (not released yet) falls int... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yy0931 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width