Alternative scheme support for the markdown URL

Open
#4,237 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
php
Domain
backend

Research direction

Reproduce the issue by entering alt in the new message form, then inspect the flarum-markdown extension and its URL parsing behavior. Done means the gemini URL renders as a clickable link and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Description

type/bug
Current Behavior

I have following issue with Markdown parser:

[alt](gemini://site.com)
  • where gemini is the alternative protocol; the URL is valid anyway, but could not be parsed with engine (v2 beta)
Steps to Reproduce

Just text entry in the new message form

Expected Behavior

It should be clickable, but I see the plain markdown text like on example above

Screenshots

No response

Environment
  • Flarum version: v2 beta (repository)
  • Webserver: nginx
  • Hosting environment: vps
  • PHP version: 8.2
Output of php flarum info
php flarum info
Flarum core: 2.0.0-beta.3
PHP version: 8.2.29
SQLite version: 3.40.1
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, pcntl, random, Reflection, SPL, session, standard, sodium, PDO, xml, apcu, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, iconv, intl, exif, pdo_sqlite, Phar, posix, readline, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+----------------------+---------+--------+
| Flarum Extensions    |         |        |
+----------------------+---------+--------+
| ID                   | Version | Commit |
+----------------------+---------+--------+
| flarum-tags          | 2.x-dev |        |
| flarum-suspend       | 2.x-dev |        |
| flarum-subscriptions | 2.x-dev |        |
| flarum-sticky        | 2.x-dev |        |
| flarum-mentions      | 2.x-dev |        |
| flarum-markdown      | 2.x-dev |        |
| flarum-lock          | 2.x-dev |        |
| flarum-likes         | 2.x-dev |        |
| flarum-lang-english  | 2.x-dev |        |
| flarum-flags         | 2.x-dev |        |
+----------------------+---------+--------+
Base URL: 
Installation path: /var/www/flarum
Queue driver: sync
Session driver: file
Mail driver: mail
Debug mode: off
Possible Solution

No response

Additional Context

No response

Dominant language
PHP
Stars
6.8k
Forks
891
Avg merge
1d 10h
Merged PRs (30d)
209

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flarum/framework

All issues in flarum/framework

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.