Go to file
Takagi f40014d005
fix: error occurs when the link is purely numerical (#5479)
#### What type of PR is this?

/kind bug
/area editor
/area ui
/milestone 2.14.x

#### What this PR does / why we need it:

在默认的富文本编辑器中,使用了 [tiptap link](b3ef574f3d/packages/extension-link/src/link.ts (L127C3-L135C5)) ,而其中的 renderHTML 会对 href 进行处理,但当链接为纯数字的时候,`HTMLAttributes.href` 将不会有 `startsWith` 方法。

此 PR 将在解析 renderHTML 时,将 `HTMLAttributes.href` 转为 string,进而解决这个问题。

#### How to test it?

测试使用默认富文本编辑器时,编写一个链接,并将其设置为纯数字。
刷新页面,查看是否具有报错。

#### Which issue(s) this PR fixes:

Fixes #5478 

#### Does this PR introduce a user-facing change?
```release-note
解决在默认富文本编辑器中当链接为纯数字时报错的问题
```
2024-03-14 05:06:07 +00:00
.github chore: update issue template (#5407) 2024-02-27 04:02:13 +00:00
api Set source and target compatibility to Java 17 (#5499) 2024-03-12 07:44:07 +00:00
application refactor: optimize reply queries using index mechanisms (#5497) 2024-03-13 08:44:08 +00:00
buildSrc Support publishing to maven central repository (#3767) 2023-04-18 14:28:23 +08:00
config/checkstyle chore: add checkstyle rule (#2091) 2022-05-17 06:46:11 +00:00
docs Provide extension points for authentication-related web filters (#5386) 2024-02-23 09:04:40 +00:00
e2e feat: support reset passwords based on email address (#4941) 2023-12-01 03:06:09 +00:00
gradle/wrapper Upgrade to Gradle 8.4 (#4848) 2023-11-13 03:06:08 +00:00
hack chore: add cherry_pick_pull.sh for cherry-picking pull request (#1554) 2021-12-03 10:21:24 +08:00
platform Upgrade PF4J to 3.11.0 (#5462) 2024-03-07 06:45:06 +00:00
ui fix: error occurs when the link is purely numerical (#5479) 2024-03-14 05:06:07 +00:00
.dockerignore chore: rename console to ui in some files (#5347) 2024-02-07 14:40:08 +00:00
.editorconfig Support backup and restore (#4206) 2023-07-24 08:26:16 +00:00
.gitattributes Refactor .gitignore 2019-04-03 11:37:59 +08:00
.gitignore test: add e2e test cases of user, role, and plugin (#4920) 2023-11-28 21:52:44 +08:00
.gitpod.yml test: add e2e test cases of user, role, and plugin (#4920) 2023-11-28 21:52:44 +08:00
CODE_OF_CONDUCT.md docs: add CODE_OF_CONDUCT.md (#2150) 2022-06-12 08:10:12 +00:00
CONTRIBUTING.md docs: update the branch name from `master` to `main` in contribution.md (#5359) 2024-02-17 08:00:15 +00:00
Dockerfile Upgrade to JDK/JRE 21 when building Docker image 2024-02-06 16:50:26 +08:00
LICENSE Create LICENSE 2018-03-21 21:39:46 +08:00
OWNERS chore: add @LIlGG to reviewers list (#3292) 2023-02-13 01:48:18 +00:00
README.md Prepare for developing 2.14 (#5448) 2024-03-06 03:04:07 +00:00
SECURITY.md Mark the security policy for version 1.x as unsupported (#5450) 2024-03-06 06:06:07 +00:00
gradle.properties Prepare for developing 2.14 (#5448) 2024-03-06 03:04:07 +00:00
gradlew Upgrade to Gradle 8.4 (#4848) 2023-11-13 03:06:08 +00:00
gradlew.bat Upgrade to Gradle 8.0.2 (#3543) 2023-03-21 02:44:27 +00:00
settings.gradle Add build script for ui project 2024-02-03 22:51:50 +08:00

README.md

Halo logo

Halo [ˈheɪloʊ],强大易用的开源建站工具。

GitHub release Docker pulls GitHub last commit GitHub Workflow Status Codecov percentage Halo - Powerful and easy-to-use Open-Source website building tool | Product Hunt
官网 文档 社区 Gitee Telegram 频道


快速开始

docker run -it -d --name halo -p 8090:8090 -v ~/.halo2:/root/.halo2 halohub/halo:2.13

以上仅作为体验使用,详细部署文档请查阅:https://docs.halo.run/getting-started/install/docker-compose

在线体验

生态

可访问 官方应用市场awesome-halo 仓库 查看适用于 Halo 2.x 的主题和插件。

许可证

license

Halo 使用 GPL-v3.0 协议开源,请遵守开源协议。

赞助

如果 Halo 对你有帮助,欢迎赞助我们,感谢以下赞助者对 Halo 项目的支持:

sponsors

贡献

参考 CONTRIBUTING

状态

Repobeats analytics