Title: BEL-terminated OSC 8 hyperlinks inflate table column widths · Issue #460 · astanin/python-tabulate · GitHub
Open Graph Title: BEL-terminated OSC 8 hyperlinks inflate table column widths · Issue #460 · astanin/python-tabulate
X Title: BEL-terminated OSC 8 hyperlinks inflate table column widths · Issue #460 · astanin/python-tabulate
Description: Summary BEL-terminated OSC 8 hyperlinks are treated as visible text when calculating column widths. The equivalent ST-terminated link is handled correctly. Environment Current master 268615a, Python 3.14.6, macOS arm64. Imported directly...
Open Graph Description: Summary BEL-terminated OSC 8 hyperlinks are treated as visible text when calculating column widths. The equivalent ST-terminated link is handled correctly. Environment Current master 268615a, Pytho...
X Description: Summary BEL-terminated OSC 8 hyperlinks are treated as visible text when calculating column widths. The equivalent ST-terminated link is handled correctly. Environment Current master 268615a, Pytho...
Opengraph URL: https://github.com/astanin/python-tabulate/issues/460
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BEL-terminated OSC 8 hyperlinks inflate table column widths","articleBody":"### Summary\n\nBEL-terminated OSC 8 hyperlinks are treated as visible text when calculating column widths. The equivalent ST-terminated link is handled correctly.\n\n### Environment\n\nCurrent master `268615a`, Python 3.14.6, macOS arm64. Imported directly from the checkout (version is `unknown`).\n\n### Reproduction\n\n```python\nfrom tabulate import tabulate\n\nfor terminator in (\"\\x1b\\\\\", \"\\x07\"):\n label = f\"\\x1b]8;;https://example.com{terminator}docs\\x1b]8;;{terminator}\"\n result = tabulate([[label, \"ok\"]], headers=[\"name\", \"state\"], tablefmt=\"grid\")\n print(result.splitlines()[0])\n```\n\nActual:\n\n```text\n+--------+---------+\n+-------------------------------------+---------+\n```\n\nExpected: both tables use the first width; both links display the same four-character label. Terminal tables containing hyperlinks generated with BEL otherwise have unnecessarily wide borders and misaligned cell separators.\n\nThe hyperlink specification linked in the source explicitly describes BEL as an alternative OSC terminator: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#the-escape-sequence . `_st` currently recognizes only `ESC \\\\`.\n\nI checked #39 and the merged #184, and #273 (escape sequences within link text / directly adjacent links). This reproduction has plain link text and a closing sequence; only the terminator differs.\n\nAI assistance: Codex helped analyze and draft this report. The reproduction was executed locally. No PR is attached.\n","author":{"url":"https://github.com/GreedyC","@type":"Person","name":"GreedyC"},"datePublished":"2026-10-02T10:31:34Z","url":"https://github.com/astanin/python-tabulate/issues/460"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:72aa3c00-c4ba-ad41-b8a6-5236c4902e1f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB52:27B678:3C1D3D:5461AA:6AFF2B2C |
| html-safe-nonce | d2f15cd397ceb9cb1f3315ac41d1922a6badab133e7726e2772e52c5df247a3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjUyOjI3QjY3ODozQzFEM0Q6NTQ2MUFBOjZBRkYyQjJDIiwidmlzaXRvcl9pZCI6IjIyOTA3ODY1ODY1NDA4NDU4NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9e42eb048077e69b88b2328df703eb649009c66a084b8f6298adb99a9089745e |
| hovercard-subject-tag | issue:5676175865 |
| 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/astanin/python-tabulate/460/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e6fc2c05ff6da927b52e020b5224fe8d242cc7076b22e7cc48ffb4afb6deea0d/astanin/python-tabulate/issues/460 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e6fc2c05ff6da927b52e020b5224fe8d242cc7076b22e7cc48ffb4afb6deea0d/astanin/python-tabulate/issues/460 |
| og:image:alt | Summary BEL-terminated OSC 8 hyperlinks are treated as visible text when calculating column widths. The equivalent ST-terminated link is handled correctly. Environment Current master 268615a, Pytho... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | GreedyC |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f17b1b6aaf5b5282f707841888227b05e9687d26eb9b2881b346fc2bd2bb168 |
| turbo-cache-control | no-preview |
| go-import | github.com/astanin/python-tabulate git https://github.com/astanin/python-tabulate.git |
| octolytics-dimension-user_id | 71802 |
| octolytics-dimension-user_login | astanin |
| octolytics-dimension-repository_id | 205875548 |
| octolytics-dimension-repository_nwo | astanin/python-tabulate |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 205875548 |
| octolytics-dimension-repository_network_root_nwo | astanin/python-tabulate |
| 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 | 8e0e959a65d11557f8574a38791f5fff4897ff95 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width