Skip to content

fix #4001 ブログコメント管理:文字色の相違がある件を修正#4405

Open
kaburk wants to merge 1 commit into
baserproject:5.2.xfrom
kaburk:5.2.x-#4001
Open

fix #4001 ブログコメント管理:文字色の相違がある件を修正#4405
kaburk wants to merge 1 commit into
baserproject:5.2.xfrom
kaburk:5.2.x-#4001

Conversation

@kaburk

@kaburk kaburk commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

よろしくお願いします。

Copilot AI review requested due to automatic review settings June 3, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

ブログコメント管理画面などで BcTextHelper::autoLinkUrls() を利用した際に、ドメインのみのURL(例: https://example.com/)の末尾スラッシュがリンク(</a>)の外に出てしまい、スラッシュだけ文字色が変わる表示崩れを回避するための修正です。CakePHP本体の TextHelper::autoLinkUrls() の出力に対して、壊れたパターンに限定した後処理で補正しています。

Changes:

  • BcTextHelper::autoLinkUrls() をオーバーライドし、リンク化後テキストに対して末尾スラッシュの表示崩れを補正
  • 補正用の正規表現処理(壊れたHTMLパターンのみ対象)を protected メソッドとして追加
  • 末尾スラッシュ補正のユニットテストを追加

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
plugins/baser-core/src/View/Helper/BcTextHelper.php autoLinkUrls() の結果に対し、</a>/ となる壊れた末尾スラッシュだけをリンク内へ戻す補正を追加
plugins/baser-core/tests/TestCase/View/Helper/BcTextHelperTest.php ドメインのみURLで末尾スラッシュがリンク外に出ないことを検証するテストを追加

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants