Project

General

Profile

Backport(バックポート) #3716

mail_to 関数を用いるときに空白が + に変換されてしまう

Added by isao sano over 4 years ago. Updated over 4 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Assignee:
Target version:
Start date:
2013-08-09
Due date:
% Done:

100%


Description

概要

mail_to 関数を用いるときに空白が + に変換されてしまう.
mailto スキームを用いる場合は + ではなく %20 にすべきだが, symfony の UrlHelper では urlencode() を用いるため + に変換されてしまい,空白が + で表示されてしまう.

http://www.ietf.org/rfc/rfc2368.txt

修正案

diff --git a/lib/vendor/symfony/lib/helper/UrlHelper.php b/lib/vendor/symfony/lib/helper/UrlHelper.php
index d0bc4c1..4995c49 100644
--- a/lib/vendor/symfony/lib/helper/UrlHelper.php
+++ b/lib/vendor/symfony/lib/helper/UrlHelper.php
@@ -498,7 +498,7 @@ function mail_to($email, $name = '', $options = array(), $default_value = array(
   $default = array();
   foreach ($default_tmp as $key => $value)
   {
-    $default[] = urlencode($key).'='.urlencode($value);
+    $default[] = rawurlencode($key).'='.rawurlencode($value);
   }
   $options = count($default) ? '?'.implode('&', $default) : '';


Related issues

Copied from OpenPNE 3 - Bug(バグ) #3383: mail_to 関数を用いるときに空白が + に変換されてしまう Won't fix(対応せず) 2013-08-09

Associated revisions

Revision 27421698 (diff)
Added by isao sano over 4 years ago

repair the function that changes space into symbol +(fixes #3716, BP from #3383)

Revision b2e07c01
Added by Shinichi Urabe over 4 years ago

Merge pull request #216 from isaosano/t-3716

repair the function that changes space into symbol +(fixes #3716, BP from #3383)

History

#1 Updated by isao sano over 4 years ago

  • Copied from Bug(バグ) #3383: mail_to 関数を用いるときに空白が + に変換されてしまう added

#2 Updated by isao sano over 4 years ago

  • Status changed from New(新規) to Accepted(着手)

#3 Updated by isao sano over 4 years ago

  • Status changed from Accepted(着手) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

https://github.com/openpne/OpenPNE3/pull/216
にてプルリクエストを行いました

#4 Updated by Shinichi Urabe over 4 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70

#5 Updated by isao sano over 4 years ago

  • Assignee set to isao sano

#6 Updated by isao sano over 4 years ago

  • Status changed from Pending Testing(テスト待ち) to Pending Merge(マージ待ち)
  • % Done changed from 70 to 80

単体試験完了しました。
マージお願いたします。

#7 Updated by Shinichi Urabe over 4 years ago

  • Status changed from Pending Merge(マージ待ち) to Fixed(完了)
  • % Done changed from 80 to 100

Also available in: Atom PDF