Skip to content

Links containing %23 are visually rendered as different links #493

@samueltardieu

Description

@samueltardieu

Telega Setup

OS: NixOS 24.11 (Vicuna)
Emacs: GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.18.0, Xaw3d scroll bars)
Features: svg webp ffmpeg
Telega: telega v0.8.293 (TDLib v1.8.29-12c1689) (telega-server v0.8.2 [docker])

Current Behavior

Links are unhexified before being rendered. While this is fine for most codepoints, "%23" is displayed as "#" which has a different semantics.

For example, "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%231079375" will be displayed as "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=#1079375" which is interpreted by web browsers as "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=" with anchor "1079375".

While Telega is able to open (RET) or copy (c) the link, it renders it with visually incompatible semantics. Copying the Telega conversation into a mail, or acting on the link with embark will lead to the wrong URL being used.

Steps to Reproduce

Possible Solution

If the link target and the link text are identical (or the link text is omitted, I didn't check the tdlib api), "%23" should be exempt from unhexification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions