# URLを貼り付けると、スペースとして正しく使用されている場合に文字が不適切に処理される

**URL:** https://meta.discourse.org/t/pasted-urls-process-characters-improperly-when-they-are-used-properly-as-spaces/391836
**Category:** Bug
**Tags:** composer
**Created:** [2025 年 12 月 21 日午前 4:11 UTC](https://meta.discourse.org/t/pasted-urls-process-characters-improperly-when-they-are-used-properly-as-spaces/391836 "2025-12-21T04:11:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MentalNomad](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalnomad/32/95159_2.png) [@MentalNomad](https://meta.discourse.org/u/MentalNomad)
#### Post date: [2025 年 12 月 21 日午前 4:11 UTC](https://meta.discourse.org/t/pasted-urls-process-characters-improperly-when-they-are-used-properly-as-spaces/391836/1 "2025-12-21T04:11:49Z")

</div>

[Pasted URLs in Rich Text Editor improperly escape tilde character](https://meta.discourse.org/t/pasted-urls-in-rich-text-editor-improperly-escape-tilde-character/377739/4)からの議論を続けます。

再現手順：

> **[Frink System Solver](https://frinklang.org/fsp/solve2.fsp?equations=a%2B%3D%2B3%2Bb%2B%2B%2Bc&solveFor=&f=&ev=on&sel_a=S&val_a=&sel_b=S&val_b=&sel_c=L&val_c=299792458%2Bm%2Bs%5E-1&resultAs=)**

上記URLをエディタに貼り付けました。  
`https://frinklang.org/fsp/solve2.fsp?equations=a+%3D+3+b+%2B+c\u0026solveFor=\u0026f=\u0026ev=on\u0026sel_a=S\u0026val_a=\u0026sel_b=S\u0026val_b=\u0026sel_c=L\u0026val_c=299792458+m+s%5E-1\u0026resultAs=`

リンクをクリックした際の正しい応答は次のとおりです。

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/a/c/cac8591d489416958f801daa4f46ac32d4c16dd3.png)

しかし、DiscourseでレンダリングされたURLは次のとおりです。  
`https://frinklang.org/fsp/solve2.fsp?equations=a%2B%3D%2B3%2Bb%2B%2B%2Bc\u0026solveFor=\u0026f=\u0026ev=on\u0026sel_a=S\u0026val_a=\u0026sel_b=S\u0026val_b=\u0026sel_c=L\u0026val_c=299792458%2Bm%2Bs%5E-1\u0026resultAs=`

`+`文字が`%2B`に置き換えられていることに注意してください。これにより失敗し、次の結果が生成されます。

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/3/f/43fbf515a427ff0b879bde78bce0e11590ab87d3.png)

ハイパーリンクツールをテストします。

[Discourse-Made-Hyperlink](https://frinklang.org/fsp/solve2.fsp?equations=a+%253D+3+b+%252B+c%5Cu0026solveFor=%5Cu0026f=%5Cu0026ev=on%5Cu0026sel_a=S%5Cu0026val_a=%5Cu0026sel_b=S%5Cu0026val_b=%5Cu0026sel_c=L%5Cu0026val_c=299792458+m+s%5E-1%5Cu0026resultAs=)

DiscourseリンクツールでレンダリングされたURL：  
`https://frinklang.org/fsp/solve2.fsp?equations=a%2B%3D%2B3%2Bb%2B%2B%2Bc\u0026solveFor=\u0026f=\u0026ev=on\u0026sel_a=S\u0026val_a=\u0026sel_b=S\u0026val_b=\u0026sel_c=L\u0026val_c=299792458%2Bm%2Bs%5E-1\u0026resultAs=`

これも失敗し、次のように表示されます。

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/d/8/ad81e795d037ac4a4705add11de87f1615c5bfe9.png)

何が問題なのか100%確信はありませんが、`+`文字が誤ってリテラルの`+`として処理されていることが原因だと思います。これはスペースであるべきです。

URLでスペースの代わりに`+`を使用することは標準に準拠しているため、この問題は同様に`+`文字を使用する他のサイトやシステムにも影響を与えている可能性があります。

---

<div class="post-metadata">

### Author: ![MentalNomad](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalnomad/32/95159_2.png) [@MentalNomad](https://meta.discourse.org/u/MentalNomad)
#### Post date: [2025 年 12 月 21 日午前 4:14 UTC](https://meta.discourse.org/t/pasted-urls-process-characters-improperly-when-they-are-used-properly-as-spaces/391836/2 "2025-12-21T04:14:46Z")

</div>

その他、関連していると思ったが、今はそうではないと思う問題：

> <https://github.com/discourse/discourse/pull/34834>
>
> Regressed in: a24107dd15588b10fd7fb1c06bcfafdfef0b6d0e
> 
> Pasting in test.com/%2…0test as a link would cause % to be double encoded to %25. 
> 
> (impacts insert link in composer)

[https://meta.discourse.org/t/links-produced-by-the-composer-link-modal-break-when-they-contain-a-27/376782/6](https://meta.discourse.org/t/links-produced-by-the-composer-link-modal-break-when-they-contain-a-27/376782/6)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2025 年 12 月 22 日午前 12:52 UTC](https://meta.discourse.org/t/pasted-urls-process-characters-improperly-when-they-are-used-properly-as-spaces/391836/3 "2025-12-22T00:52:08Z")

</div>

ええ、これは厄介な問題ですね。oneboxerとフロントエンドのバグだけだと思います。

[https://frinklang.org/fsp/solve2.fsp?equations=a+%2B+b&solveFor=&f=&ev=on](https://frinklang.org/fsp/solve2.fsp?equations=a+%2B+b&solveFor=&f=&ev=on)

対：

> **[Frink System Solver](https://frinklang.org/fsp/solve2.fsp?equations=a%2B%2B%2Bb&solveFor=&f=&ev=on)**

```plaintext
<https://frinklang.org/fsp/solve2.fsp?equations=a+%2B+b&solveFor=&f=&ev=on>

対：

https://frinklang.org/fsp/solve2.fsp?equations=a+%2B+b&solveFor=&f=&ev=on

```

ここに修正がありますが、関連トピックからわかるように、これは非常に複雑です:tm:。長年にわたり、この分野で多くのバグが発生しています。

> <https://github.com/discourse/discourse/pull/36822>

---

<div class="post-metadata">

### Author: ![MentalNomad](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalnomad/32/95159_2.png) [@MentalNomad](https://meta.discourse.org/u/MentalNomad)
#### Post date: [2025 年 12 月 22 日午前 3:18 UTC](https://meta.discourse.org/t/pasted-urls-process-characters-improperly-when-they-are-used-properly-as-spaces/391836/4 "2025-12-22T03:18:03Z")

</div>

ご配慮ありがとうございます！

Frink言語の作成者であるアランなら、100%標準準拠でありながら、あらゆるエラーを暴いてくれると信頼できます。それが彼の_やること_ですから。

（ちなみに、科学的または工学的なアプリケーションで極端な単位の正確さが必要な場合は、ぜひFrinkをチェックしてみてください。）
