Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Improve sanitization options: making it pluggable

オープン
#84 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript
領域
content, security

調査の方向性

lib/html.js、特に potentiallyUnsafe を読み、HtmlInline と HtmlBlock が現在 raw HTML をどのように処理しているかを追跡してください。Issue に記載された sanitizer hook と置換動作を定義し、そのうえで table、tr、/table などの安全なタグを保持できる一方、script の内容は拒否されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

I would like to have more sanitization options for raw html in markdown. For example: i would like to allow raw html bits like <table>, <tr> and </table> but disallow evil things like <script>takeOverTheWorld();</script>. Right now: we can either allow or disallow all raw html. If we make the sanitation pluggable, the user can choose which sanitation library he/she wants to plug in.

The most straightforward way to make sensitization pluggable would be to provide a function that does what 'potentiallyUnsafe' in lib/html.js does, plus a sanitizeRawHtml function that could be used for HtmlInline and HtmlBlock instead of just always omitting a comment '<!-- raw HTML omitted -->'.

This would be a minimum modification from what we have. I will create a pull request for this.

主要言語
JavaScript
スター
1.6k
フォーク
234
平均マージ
1日 27分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

commonmark/commonmark.js のほかの issue

commonmark/commonmark.js の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。