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

[v2] URI template strict expansions leave !'()* unencoded

オープン 初心者向け
#2,919 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@takagibit18 がすでに取り組んでいます。

2026年10月2日 から。

  • #2922 @takagibit18 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
api

調査の方向性

packages/core-internal/src/shared/uriTemplate.ts から始め、UriTemplate.expand() と encodeValue() に焦点を当ててから、Node.js 24 以降で repro.mjs の例を実行します。simple と query の展開で !'()* が示されているとおりパーセントエンコードされ、reserved と fragment の展開では許可された文字が保持されれば完了です。

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

説明

v1 v2
What happened?

UriTemplate.expand() leaves !'()* unchanged in simple expansions. Query values have the same problem: search{?q} with q: 'hello!' produces search?q=hello!.

encodeURIComponent() leaves these characters unchanged, and encodeValue() returns that output directly for strict expansion operators.

What did you expect?

Expected output from the snippet below:

%21%27%28%29%2A
search?q=hello%21

RFC 6570 section 3.2.1 permits unreserved characters in strict variable expansions. The five characters above are reserved and need percent-encoding. Reserved and fragment expansions can keep them.

Code to reproduce

Save this as repro.mjs at the SDK repository root and run node repro.mjs with Node.js 24 or later. It imports the source module directly.

import { UriTemplate } from './packages/core-internal/src/shared/uriTemplate.ts';

const value = "!'()*";
console.log(new UriTemplate('{value}').expand({ value }));
console.log(new UriTemplate('search{?q}').expand({ q: 'hello!' }));

Current output:

!'()*
search?q=hello!
SDK version

main at e16d27729ea2fae144a6d957fd0372d9eb0e6c58 (v2 source checkout). Tested with Node.js 24.12.0.

Area

Other

主要言語
TypeScript
スター
13.5k
フォーク
2.3k
平均マージ
1日 15時間
マージ済み PR(30日)
51

環境構築

はじめの一歩

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

modelcontextprotocol/typescript-sdk のほかの issue

modelcontextprotocol/typescript-sdk の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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