{"id":15296331,"url":"https://github.com/lucadevelop/telegram-entities-decoder","last_synced_at":"2025-08-02T18:09:04.527Z","repository":{"id":62519656,"uuid":"279788571","full_name":"LucaDevelop/telegram-entities-decoder","owner":"LucaDevelop","description":"Telegram entities decoder in PHP","archived":false,"fork":false,"pushed_at":"2024-05-28T12:40:29.000Z","size":40,"stargazers_count":32,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-15T17:50:58.825Z","etag":null,"topics":["entities","html","markdown","php","php7","telegram","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LucaDevelop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-15T06:46:17.000Z","updated_at":"2025-04-14T11:16:30.000Z","dependencies_parsed_at":"2024-05-28T15:37:42.860Z","dependency_job_id":null,"html_url":"https://github.com/LucaDevelop/telegram-entities-decoder","commit_stats":{"total_commits":37,"total_committers":2,"mean_commits":18.5,"dds":0.3783783783783784,"last_synced_commit":"f17e0578a0be689a08c0d0b02230859aecf3836c"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/LucaDevelop/telegram-entities-decoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaDevelop%2Ftelegram-entities-decoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaDevelop%2Ftelegram-entities-decoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaDevelop%2Ftelegram-entities-decoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaDevelop%2Ftelegram-entities-decoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LucaDevelop","download_url":"https://codeload.github.com/LucaDevelop/telegram-entities-decoder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LucaDevelop%2Ftelegram-entities-decoder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268431638,"owners_count":24249413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["entities","html","markdown","php","php7","telegram","telegram-bot","telegram-bot-api"],"created_at":"2024-09-30T18:10:07.411Z","updated_at":"2025-08-02T18:09:04.481Z","avatar_url":"https://github.com/LucaDevelop.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram-entities-decoder\n[![Build Status](https://scrutinizer-ci.com/g/LucaDevelop/telegram-entities-decoder/badges/build.png?b=master)](https://scrutinizer-ci.com/g/LucaDevelop/telegram-entities-decoder/build-status/master) [![Latest Stable Version](https://img.shields.io/github/v/release/lucadevelop/telegram-entities-decoder?display_name=tag\u0026label=stable)](https://packagist.org/packages/lucadevelop/telegram-entities-decoder) [![Total Downloads](http://poser.pugx.org/lucadevelop/telegram-entities-decoder/downloads)](https://packagist.org/packages/lucadevelop/telegram-entities-decoder) [![Latest Unstable Version](http://poser.pugx.org/lucadevelop/telegram-entities-decoder/v/unstable)](https://packagist.org/packages/lucadevelop/telegram-entities-decoder) [![License](http://poser.pugx.org/lucadevelop/telegram-entities-decoder/license)](https://packagist.org/packages/lucadevelop/telegram-entities-decoder) [![PHP Version Require](http://poser.pugx.org/lucadevelop/telegram-entities-decoder/require/php)](https://packagist.org/packages/lucadevelop/telegram-entities-decoder)\n\n![EntityDecoder](https://user-images.githubusercontent.com/68305127/164949030-622a200e-8c18-4480-b8e2-08476801bb90.PNG)\n\nThis class decode style entities from Telegram bot messages (bold, italic, etc.) in text with inline entities that duplicate (when possible) the\nexact style the message had originally when was sended to the bot.\nAll this work is necessary because Telegram returns offset and length of the entities in UTF-16 code units that they've been hard to decode correctly in PHP \n\nConsider to ⭐️ Star this project\n\n## Compatibility\nPHP \u003e= 7.0\n\n## Features\n- Decode entities from text messages and attachments caption.\n- Supports all Telegram parse modes (Markdown, HTML and MarkdownV2). HTML has more entropy but it's easily the best and it's recommended.\n- Supports emoji in the text field\n- Easy to use\n\n_NOTE: Markdown parse mode is deprecated and no longer up-to-date so it doesn't support all entities. Use MarkdownV2 or HTML._\n\n## Example usage\n```\n$entity_decoder = new EntityDecoder('HTML');\n$decoded_text = $entity_decoder-\u003edecode($message);\n```\n_See demo folder for full example_\n\n## Composer\n```\ncomposer require lucadevelop/telegram-entities-decoder\n```\nUsage:\n```\nrequire 'vendor/autoload.php';\nuse lucadevelop\\TelegramEntitiesDecoder\\EntityDecoder;\n[...]\n$entity_decoder = new EntityDecoder('HTML');\n$decoded_text = $entity_decoder-\u003edecode($message);\n```\n\n## Credits\n- Telegram docs: https://core.telegram.org/bots/api#formatting-options\n- Inspired By: https://github.com/php-telegram-bot/core/issues/544#issuecomment-564950430\n\n## Contacts\n![Telegram](https://telegram.org/favicon.ico) [@LucaDevelop](https://t.me/LucaDevelop)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucadevelop%2Ftelegram-entities-decoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucadevelop%2Ftelegram-entities-decoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucadevelop%2Ftelegram-entities-decoder/lists"}