Skip to content
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

重复 HTML Meta 标签没有被完全处理 #4234

Closed
guqing opened this issue Jul 16, 2023 · 0 comments · Fixed by #4235
Closed

重复 HTML Meta 标签没有被完全处理 #4234

guqing opened this issue Jul 16, 2023 · 0 comments · Fixed by #4235
Assignees
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Milestone

Comments

@guqing
Copy link
Member

guqing commented Jul 16, 2023

Your current Halo version

2.7.0

Describe this feature

PR #4069 对 HTML Meta 重复的标签进行了处理,但是对有些标签无法去除重复

  1. name 属性和 content 属性位置颠倒时无法去除
            
<meta content="全局 Head description" name="description" />
            
<style>
  .moment .momemt-content pre.notranslate {
    background: #f3f3f3;
    color: #444;
  }
</style>
  1. 带了自结束标记的 meta 无法去除重复
<meta name="description" content="Hi ther" />

属于正则表达式有问题,需要优化一下

Additional information

/kind improvement
/area core
/milestone 2.8.x
/assign

@f2c-ci-robot f2c-ci-robot bot added the kind/improvement Categorizes issue or PR as related to a improvement. label Jul 16, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.7.x milestone Jul 16, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Jul 16, 2023
@guqing guqing modified the milestones: 2.7.x, 2.8.x Jul 16, 2023
f2c-ci-robot bot pushed a commit that referenced this issue Jul 20, 2023
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.8.x

#### What this PR does / why we need it:
优化去除 Html Meta 重复标签的正则表达式

see #4234 for more details.

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

Fixes #4234

#### Does this PR introduce a user-facing change?

```release-note
优化去除 Html Meta 重复标签的正则表达式
```
@ruibaby ruibaby modified the milestones: 2.8.x, 2.8.0 Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants