Skip to content

fix: 削除関数の統一#16

Open
tkt12 wants to merge 1 commit intomainfrom
commonscript
Open

fix: 削除関数の統一#16
tkt12 wants to merge 1 commit intomainfrom
commonscript

Conversation

@tkt12
Copy link
Contributor

@tkt12 tkt12 commented Jul 20, 2025

No description provided.

};
`;

return <script dangerouslySetInnerHTML={{ __html: scriptContent }}></script>;

Choose a reason for hiding this comment

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

[ask]

このような実装にしてみた背景が気になります!

dangerouslySetInnerHTML という記法は、危険なスクリプトが埋め込まれるリスクがあるので、推奨される書き方ではありません!
tsx ファイルなので、よりよい書き方ができそうですが、検討してみてはいかがでしょうか?

Choose a reason for hiding this comment

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

具体的には以下のようなリスクがあります!非機能要件の保守性・安全性の観点が気になっています!

https://qiita.com/ushi_osushi/items/2c09e2d3a1f3db63e5a3

また、 hono/jsx がこのプロジェクトでは使われているので、公式ドキュメントが参考になりそうです!

https://hono.dev/docs/guides/jsx

@tkt12 tkt12 closed this Jul 20, 2025
@tkt12 tkt12 reopened this Jul 20, 2025
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