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

NodeTreeBase: Fix HTML href attribute parsing #1237

Merged
merged 1 commit into from Aug 29, 2023

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Aug 29, 2023

datデータからHTML要素を解析する処理のうち<a>要素のhref属性を探す処理を修正します。
修正前は<a>タグの中で最初に現れる属性がhrefであると決め打ちしていたためhrefの前に別の属性があるリンクではURLが間違って設定される問題がありました。

注意

href属性の判定は速度を重視するため不完全なチェックです。<a>タグに含まれる'='、global属性、data属性で誤判定する可能性があります。

修正にあたり不具合報告をしていただきありがとうございました。
https://next2ch.net/test/read.cgi/linux/1654053581/127

Closes #1236

datデータからHTML要素を解析する処理のうち`<a>`要素のhref属性を探す
処理を修正します。
修正前は`<a>`タグの中で最初に現れる属性がhrefであると決め打ちしていたため
hrefの前に別の属性があるリンクではURLが間違って設定される問題がありました。

注意
href属性の判定は速度を重視するため不完全なチェックです。`<a>`タグに
含まれる'='、global属性、data属性で誤判定する可能性があります。

修正にあたり不具合報告をしていただきありがとうございました。
https://next2ch.net/test/read.cgi/linux/1654053581/127
@ma8ma ma8ma added the bug バグの追跡 label Aug 29, 2023
@ma8ma ma8ma merged commit c11d47e into master Aug 29, 2023
20 checks passed
@ma8ma ma8ma deleted the nodetreebase-fix-html-attribute-href-parsing branch August 29, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug バグの追跡
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

まちBBSのスレにある通常リンクをクリックすると http://noopener/ が開かれる
1 participant