Bullet list items with links cause redirect error appending URLs to path when in Book Mode

未关闭
#427 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
领域
frontend, web-dev

调研方向

从 https://hackmd.io/@Partheo/spriting/ 中已发布的笔记复现该重定向,重点关注第 72 行的 * [/tg/station](https://github.com/tgstation/tgstation)。比较已发布笔记中的项目符号列表链接和编号列表链接,并追踪 URL 是如何附加到路径上的。当包含项目符号列表项中 URL 的已发布笔记能够正常加载且不会发生错误重定向时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Is this a hackmd.io issue?

Yes, the bug happens on https://hackmd.io

What's the problem

Notes that contain a bulleted list * or - that have a link somewhere in that line will cause the page to load with a broken redirect, which breaks the page entirely (at least on Firefox)

Current behaviour

I have a published note at https://hackmd.io/@Partheo/spriting/ that has this issue. Loading this page will send you to https://hackmd.io/@Partheo/spriting/https%3A%2F%2Fgithub.com%2Ftgstation%2Ftgstation instead, which doesn't work. This occurs on the first bulleted link in the note, in this case the problematic line is line 72, which is * [/tg/station](https://github.com/tgstation/tgstation)
Changing the * to a - makes no difference. This bug does not occur with 1. 2. 3. numbered lists.
Deleting the link simply leads the next bulleted link in the document to cause the error. It's not specific to that link in particular.

This also occurs on Firefox on my phone, and on the Edge browser on PC. It is also breaking the fetched information that google gets when the note shows up in search results, so this is definitely an error on HackMD's end.

Reproduction:
Publish a note with a bulleted list somewhere in it
Place any URL in the bulleted list
Try loading the note in its published form
Observe odd redirect

Expected behaviour

My note loaded fine a couple months ago. This seems like a recent problem.

主要语言
没有语言数据
星标
40
派生
9
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

hackmdio/hackmd-io-issues 的其他 Issue

查看 hackmdio/hackmd-io-issues 的全部 Issue

相似的 Issue

更多 Web Dev Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。