feat: Use rel="noopener noreferrer nofollow ugc" on user links#215
Merged
f2c-ci-robot[bot] merged 4 commits intohalo-dev:mainfrom Apr 7, 2026
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Contributor
Author
|
@JohnNiang 请求 review |
3ec932e to
5d02526
Compare
ruibaby
requested changes
Apr 6, 2026
…l=-noopener-ugc-on-user-links
…l=-noopener-ugc-on-user-links
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #214
+ ugc符合最新语义(Google 自 2019)我调查了下其他的
相关文档:
没有把链接的 target / rel 处理放进 packages/comment-widget/src/utils/html.ts 的 cleanHtml(),而是放在了渲染期 packages/comment-widget/src/comment-content.ts。
给评论正文里的 统一补 target="_blank" 和 rel="noopener noreferrer nofollow ugc" 作为渲染策略,区分于清洗逻辑。如果要在清洗的时候就做这个 rel 修改,有以下问题: