{ "issue": { "url": "https://api.github.com/repos/laurent22/joplin/issues/12185", "repository_url": "https://api.github.com/repos/laurent22/joplin", "labels_url": "https://api.github.com/repos/laurent22/joplin/issues/12185/labels{/name}", "comments_url": "https://api.github.com/repos/laurent22/joplin/issues/12185/comments", "events_url": "https://api.github.com/repos/laurent22/joplin/issues/12185/events", "html_url": "https://github.com/laurent22/joplin/pull/12185", "id": 3027507340, "node_id": "PR_kwDOBLftOs6UTdwT", "number": 12185, "title": "fix(import): skip standard web/mail links in Markdown importer to prevent ENAMETOOLONG", "user": { "login": "yatishgoel", "id": 58841989, "node_id": "MDQ6VXNlcjU4ODQxOTg5", "avatar_url": "https://avatars.githubusercontent.com/u/58841989?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yatishgoel", "html_url": "https://github.com/yatishgoel", "followers_url": "https://api.github.com/users/yatishgoel/followers", "following_url": "https://api.github.com/users/yatishgoel/following{/other_user}", "gists_url": "https://api.github.com/users/yatishgoel/gists{/gist_id}", "starred_url": "https://api.github.com/users/yatishgoel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yatishgoel/subscriptions", "organizations_url": "https://api.github.com/users/yatishgoel/orgs", "repos_url": "https://api.github.com/users/yatishgoel/repos", "events_url": "https://api.github.com/users/yatishgoel/events{/privacy}", "received_events_url": "https://api.github.com/users/yatishgoel/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "labels": [], "state": "closed", "locked": false, "assignee": null, "assignees": [], "milestone": null, "comments": 5, "created_at": "2025-04-29T08:32:55Z", "updated_at": "2025-05-19T23:13:51Z", "closed_at": "2025-05-19T22:02:01Z", "author_association": "NONE", "active_lock_reason": null, "draft": false, "pull_request": { "url": "https://api.github.com/repos/laurent22/joplin/pulls/12185", "html_url": "https://github.com/laurent22/joplin/pull/12185", "diff_url": "https://github.com/laurent22/joplin/pull/12185.diff", "patch_url": "https://github.com/laurent22/joplin/pull/12185.patch", "merged_at": null }, "body": "### Summary\r\nEnsure that any link starting with `http://`, `https://`, or `mailto:` is treated as a URL rather than a local file path—preventing `ENAMETOOLONG` errors during Markdown import.\r\n\r\n### What it does\r\nWhen importing Markdown, any link beginning with a standard web or mail protocol is now recognized and **skipped** for file-path resolution.\r\n\r\n### Why\r\nLong URLs were being mis-interpreted as local file paths, triggering OS-level `ENAMETOOLONG` errors and aborting the import process.\r\n\r\n### How\r\n- Use the existing `hasProtocol(url, ['http', 'https', 'mailto'])` utility from `@joplin/utils/url`. \r\n- If `hasProtocol` returns true, the link is left intact and not passed to the file-system layer.\r\n\r\n### Closes\r\nCloses #12172\r\n\r\n### Testing Plan\r\n1. Create a Markdown file containing a very long web link (e.g., the Facebook redirect URL from #12172). \r\n2. Run `joplin import /path/to/file.md` in the desktop or CLI importer. \r\n3. **Verify** import completes without any `ENAMETOOLONG` errors. \r\n4. **Confirm** the long URL appears verbatim in the resulting note. \r\n5. Add a mailto link (e.g. `[Email me](mailto:someone@example.com)`) and repeat—ensure it too is preserved and import succeeds.\r\n", "closed_by": { "login": "laurent22", "id": 1285584, "node_id": "MDQ6VXNlcjEyODU1ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laurent22", "html_url": "https://github.com/laurent22", "followers_url": "https://api.github.com/users/laurent22/followers", "following_url": "https://api.github.com/users/laurent22/following{/other_user}", "gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}", "starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laurent22/subscriptions", "organizations_url": "https://api.github.com/users/laurent22/orgs", "repos_url": "https://api.github.com/users/laurent22/repos", "events_url": "https://api.github.com/users/laurent22/events{/privacy}", "received_events_url": "https://api.github.com/users/laurent22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/12185/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "timeline_url": "https://api.github.com/repos/laurent22/joplin/issues/12185/timeline", "performed_via_github_app": null, "state_reason": null }, "comments": [ { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2837940234", "html_url": "https://github.com/laurent22/joplin/pull/12185#issuecomment-2837940234", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/12185", "id": 2837940234, "node_id": "IC_kwDOBLftOs6pJ4gK", "user": { "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }, "created_at": "2025-04-29T08:33:08Z", "updated_at": "2025-05-19T23:13:50Z", "author_association": "CONTRIBUTOR", "body": "****CLA Assistant Lite bot**** All contributors have signed the CLA ✍️ ✅", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2837940234/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": { "id": 15368, "client_id": "Iv1.05c79e9ad1f6bdfa", "slug": "github-actions", "node_id": "MDM6QXBwMTUzNjg=", "owner": { "login": "github", "id": 9919, "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github", "html_url": "https://github.com/github", "followers_url": "https://api.github.com/users/github/followers", "following_url": "https://api.github.com/users/github/following{/other_user}", "gists_url": "https://api.github.com/users/github/gists{/gist_id}", "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github/subscriptions", "organizations_url": "https://api.github.com/users/github/orgs", "repos_url": "https://api.github.com/users/github/repos", "events_url": "https://api.github.com/users/github/events{/privacy}", "received_events_url": "https://api.github.com/users/github/received_events", "type": "Organization", "user_view_type": "public", "site_admin": false }, "name": "GitHub Actions", "description": "Automate your workflow from idea to production", "external_url": "https://help.github.com/en/actions", "html_url": "https://github.com/apps/github-actions", "created_at": "2018-07-30T09:30:17Z", "updated_at": "2025-03-07T16:35:00Z", "permissions": { "actions": "write", "administration": "read", "attestations": "write", "checks": "write", "contents": "write", "deployments": "write", "discussions": "write", "issues": "write", "merge_queues": "write", "metadata": "read", "models": "read", "packages": "write", "pages": "write", "pull_requests": "write", "repository_hooks": "write", "repository_projects": "write", "security_events": "write", "statuses": "write", "vulnerability_alerts": "read" }, "events": [ "branch_protection_rule", "check_run", "check_suite", "create", "delete", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issues", "issue_comment", "label", "merge_group", "milestone", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "registry_package", "release", "repository", "repository_dispatch", "status", "watch", "workflow_dispatch", "workflow_run" ] } }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2837986374", "html_url": "https://github.com/laurent22/joplin/pull/12185#issuecomment-2837986374", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/12185", "id": 2837986374, "node_id": "IC_kwDOBLftOs6pKDxG", "user": { "login": "laurent22", "id": 1285584, "node_id": "MDQ6VXNlcjEyODU1ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laurent22", "html_url": "https://github.com/laurent22", "followers_url": "https://api.github.com/users/laurent22/followers", "following_url": "https://api.github.com/users/laurent22/following{/other_user}", "gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}", "starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laurent22/subscriptions", "organizations_url": "https://api.github.com/users/laurent22/orgs", "repos_url": "https://api.github.com/users/laurent22/repos", "events_url": "https://api.github.com/users/laurent22/events{/privacy}", "received_events_url": "https://api.github.com/users/laurent22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2025-04-29T08:51:56Z", "updated_at": "2025-04-29T08:51:56Z", "author_association": "OWNER", "body": "Please remove all the formatting changes in the files", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2837986374/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2838036693", "html_url": "https://github.com/laurent22/joplin/pull/12185#issuecomment-2838036693", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/12185", "id": 2838036693, "node_id": "IC_kwDOBLftOs6pKQDV", "user": { "login": "yatishgoel", "id": 58841989, "node_id": "MDQ6VXNlcjU4ODQxOTg5", "avatar_url": "https://avatars.githubusercontent.com/u/58841989?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yatishgoel", "html_url": "https://github.com/yatishgoel", "followers_url": "https://api.github.com/users/yatishgoel/followers", "following_url": "https://api.github.com/users/yatishgoel/following{/other_user}", "gists_url": "https://api.github.com/users/yatishgoel/gists{/gist_id}", "starred_url": "https://api.github.com/users/yatishgoel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yatishgoel/subscriptions", "organizations_url": "https://api.github.com/users/yatishgoel/orgs", "repos_url": "https://api.github.com/users/yatishgoel/repos", "events_url": "https://api.github.com/users/yatishgoel/events{/privacy}", "received_events_url": "https://api.github.com/users/yatishgoel/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2025-04-29T09:10:43Z", "updated_at": "2025-04-29T09:10:43Z", "author_association": "NONE", "body": "> Please remove all the formatting changes in the files\r\n\r\nHi @laurent22,\r\nI’ve reverted all of the automatic style/formatting changes in the latest commit. Please let me know if there’s anything else I should adjust!", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2838036693/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2838040320", "html_url": "https://github.com/laurent22/joplin/pull/12185#issuecomment-2838040320", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/12185", "id": 2838040320, "node_id": "IC_kwDOBLftOs6pKQ8A", "user": { "login": "yatishgoel", "id": 58841989, "node_id": "MDQ6VXNlcjU4ODQxOTg5", "avatar_url": "https://avatars.githubusercontent.com/u/58841989?v=4", "gravatar_id": "", "url": "https://api.github.com/users/yatishgoel", "html_url": "https://github.com/yatishgoel", "followers_url": "https://api.github.com/users/yatishgoel/followers", "following_url": "https://api.github.com/users/yatishgoel/following{/other_user}", "gists_url": "https://api.github.com/users/yatishgoel/gists{/gist_id}", "starred_url": "https://api.github.com/users/yatishgoel/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/yatishgoel/subscriptions", "organizations_url": "https://api.github.com/users/yatishgoel/orgs", "repos_url": "https://api.github.com/users/yatishgoel/repos", "events_url": "https://api.github.com/users/yatishgoel/events{/privacy}", "received_events_url": "https://api.github.com/users/yatishgoel/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2025-04-29T09:12:04Z", "updated_at": "2025-04-29T09:12:04Z", "author_association": "NONE", "body": "I have read the CLA Document and I hereby sign the CLA", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2838040320/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2892391030", "html_url": "https://github.com/laurent22/joplin/pull/12185#issuecomment-2892391030", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/12185", "id": 2892391030, "node_id": "IC_kwDOBLftOs6sZmJ2", "user": { "login": "laurent22", "id": 1285584, "node_id": "MDQ6VXNlcjEyODU1ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laurent22", "html_url": "https://github.com/laurent22", "followers_url": "https://api.github.com/users/laurent22/followers", "following_url": "https://api.github.com/users/laurent22/following{/other_user}", "gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}", "starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laurent22/subscriptions", "organizations_url": "https://api.github.com/users/laurent22/orgs", "repos_url": "https://api.github.com/users/laurent22/repos", "events_url": "https://api.github.com/users/laurent22/events{/privacy}", "received_events_url": "https://api.github.com/users/laurent22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2025-05-19T22:02:01Z", "updated_at": "2025-05-19T22:02:01Z", "author_association": "OWNER", "body": "Sorry, this PR is too unclear and there was no answers in 3 weeks so I'd rather close for now. Feel free to open it again once you've addressed the above comments", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/2892391030/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null } ] }