-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hexo 4.0.0 會給 a 標簽 添加 target="_blank" #3796
Comments
In your _config.yml: external_link:
enable: false |
This is a BREAKING CHANGES of Hexo 4.0.0. Before Hexo 4.0, |
@jerryc127 external_link:
enable: true
field: post The above config restore pre-4.0 behavior. Alternatively, you could also exclude certain domains: external_link:
enable: true
exclude:
- a.douban.com
- b.douban.com |
不知道现在能不能回复……使用您提供的设置config里的external_link的方法没能解决问题,而且不能更新了…… |
The fixes #3847 hexojs/hexo-util#119 haven't release yet, please wait for hexo 4.1.0 + hexo-util 1.6.0. |
* fix: external link ignore mailto: & javascript: Close hexojs#3796 * refactor: use startsWith instead of regex * refactor(external_link): use whatwg url * fix(external_link): handle whatwg url api Apply code suggestions from code review by @curbengh
Check List
Please check followings before submitting a new issue.
Expected behavior
Actual behavior
How to reproduce?
Environment & Settings
Node.js & npm version
Your site
_config.yml
(Optional)Your theme
_config.yml
(Optional)Hexo and Plugin version(
npm ls --depth 0
)Your package.json
package.json
Others
hexo 4.0.0 會給 一些a 標簽 添加 target="_blank"
而原本a 標簽是默認本頁打開的,導致打開a標簽會跳出一個頁面 about:blank#blocked
具體這個 hexo - douban的插件 生成的頁面
別添加 target="_blank" 后,導致點擊上一頁/下一頁/進入這個頁面 都會跳出一個about:blank#blocked 空頁面
我退回 3.9.0 后 沒發現問題。。可以斷定是hexo 4.0.0的問題
The text was updated successfully, but these errors were encountered: