Project

General

Profile

Backport(バックポート) #3522

google mapのURLがhttpsで始まる場合、小窓化されない

Added by Mutsumi Imamura almost 6 years ago. Updated almost 6 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Target version:
Start date:
2010-11-02
Due date:
% Done:

100%


Description

Overview (現象)

google mapのURLがhttpsで始まる場合、小窓化されない。
httpで始まるURLであれば小窓化されます。

再現バージョン

下記のバージョンで再現確認済み。

  • OpenPNE3.6.13
  • OpenPNE3.8.9

再現手順

日記にhttpsで始まる google map の URLを入力し、表示を確認する

Causes (原因)

小窓化用の maps.google.com.js がhttpsに対応していないため

Way to fix (修正内容)

https://redmine.openpne.jp/issues/1755#note-4 に添付されている差分より

diff --git a/web/cmd/maps.google.co.jp.js b/web/cmd/maps.google.co.jp.js
index a38b2c1..99ede78 100644
--- a/web/cmd/maps.google.co.jp.js
+++ b/web/cmd/maps.google.co.jp.js
@@ -1,6 +1,6 @@
 function url2cmd(url, googlemapsUrl) {
-  var maps_google_co_jp_maps = url.match(/^http:\/\/maps\.google\.co\.jp\/maps\?(.+)/);
-  var maps_google_co_jp = url.match(/^http:\/\/maps\.google\.co\.jp\/\?(.+)/);
+  var maps_google_co_jp_maps = url.match(/^https?:\/\/maps\.google\.co\.jp\/maps\?(.+)/);
+  var maps_google_co_jp = url.match(/^https?:\/\/maps\.google\.co\.jp\/\?(.+)/);

   if (maps_google_co_jp_maps || maps_google_co_jp) {
      var id = RegExp.$1;
diff --git a/web/cmd/maps.google.com.js b/web/cmd/maps.google.com.js
index 9de34e3..4e8eee5 100644
--- a/web/cmd/maps.google.com.js
+++ b/web/cmd/maps.google.com.js
@@ -1,6 +1,6 @@
 function url2cmd(url, googlemapsUrl) {
-  var maps_google_com_maps = url.match(/^http:\/\/maps\.google\.com\/maps\?(.+)/);
-  var maps_google_com = url.match(/^http:\/\/maps\.google\.com\/\?(.+)/);
+  var maps_google_com_maps = url.match(/^https?:\/\/maps\.google\.com\/maps\?(.+)/);
+  var maps_google_com = url.match(/^https?\/\/maps\.google\.com\/\?(.+)/);

   if (maps_google_com_maps || maps_google_com) {
      var id = RegExp.$1;

Related issues

Related to OpenPNE 3 - Bug(バグ) #3521: google mapのURLがhttpsで始まる場合、小窓化されない Won't fix(対応せず) 2010-11-02

Associated revisions

Revision 07f364b7 (diff)
Added by Youichi Kimura almost 6 years ago

fix pattern for Google Maps url in cmd scripts (fixes #3522, BP from #3521)

patch from https://redmine.openpne.jp/issues/1755#note-4

(cherry picked from commit c588f6f2a338cd4bbe4a058f7c4d392cc0fdf521)

History

#1 Updated by Youichi Kimura almost 6 years ago

  • Description updated (diff)

#2 Updated by Youichi Kimura almost 6 years ago

  • Status changed from New(新規) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

更新履歴 07f364b70a4b2fc2d693c03164ce6c111e6f1601 で適用されました。

#3 Updated by Yuya Watanabe almost 6 years ago

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

#4 Updated by Mutsumi Imamura almost 6 years ago

  • Status changed from Pending Testing(テスト待ち) to Fixed(完了)
  • % Done changed from 70 to 100

動作確認OKです

Also available in: Atom PDF