Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Stricter html string check#639

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
wxiaoguang wants to merge3 commits intogithub:main
base:main
Choose a base branch
Loading
fromwxiaoguang:patch-1

Conversation

wxiaoguang
Copy link

Fix#638

/^\s*<[a-zA-Z]/.test(" \n\t<a") => true

The real world case is like this:

const s = `  <div ...>   ...  </div>`;

@CopilotCopilotAI review requested due to automatic review settingsJune 30, 2025 11:09
@wxiaoguangwxiaoguang requested a review froma team as acode ownerJune 30, 2025 11:09
@wxiaoguangwxiaoguang requested a review fromareliaJune 30, 2025 11:09
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR ensures that HTML literal strings correctly handle leading whitespace by updating the regex match pattern.

  • Updated regex in unescaped-html-literal.js to allow for preceding whitespace before an HTML tag.
  • Fixes potential false negatives in matching real-world HTML snippets.
Comments suppressed due to low confidence (1)

lib/rules/unescaped-html-literal.js:18

  • Consider adding a comment explaining that the updated regex now supports leading whitespace before an HTML tag to aid future maintainability.
    const htmlOpenTag = /^\s*<[a-zA-Z]/

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@areliaareliaAwaiting requested review from areliaarelia is a code owner automatically assigned from github/web-systems-reviewers

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Makeunescaped-html-literal more strict
1 participant
@wxiaoguang

[8]ページ先頭

©2009-2025 Movatter.jp