豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Regression in 2.3.8: routes that contain an escaped question mark silently fail #3064

@jawj

Description

@jawj

Is there an existing issue for this?

  • I have searched the existing issues

Mithril.js Version

2.3.8

Browser and OS

macOS 15.7.3, Firefox 147.0, Chrome 143.0.7499.193 (this is not a browser/OS bug)

Project

https://manipulexity.com
https://github.com/jawj/wordtools

Code

example = (pattern: string, orderDir = 'freq/desc') =>
  m(m.route.Link, { href: `/pattern/${encodeURIComponent(pattern)}/single/${orderDir}/1`, selector: 'a.example' }, pattern)

// if pattern contains a ?, it is escaped, but the resulting link doesn't do anything

Steps to Reproduce

Visit manipulexity.com
Click the last link, captioned 'palindromes'

Expected Behavior

It shows palindromes

Observed Behavior

Because I have pinned 2.3.7, it works, and shows palindromes.
If I upgrade to 2.3.8, nothing happens.

Context

No response

Metadata

Metadata

Assignees

Labels

Area: CoreFor anything dealing with Mithril core itself

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions