Project

General

Profile

Enhancement(機能追加・改善) #1160

Implement auto link in the mobile_frontend. (モバイル用の自動リンク機能)

Added by Shogo Kawahara over 10 years ago. Updated over 10 years ago.

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

100%


Description

Overview

Implement auto link in the mobile_frontend.

However, when auto linking url is outer sns, it url link proxy page to prevent a session hijack.
(This measures are especially necessary for DoCoMo.)

For example:

http://sns.example.com/member/1 -> <a href="/member/1">http://sns.example.com/member/1&lt;/a>

http://google.com -> <a href="http://sns.example.com/default/linkProxy?url=http%3a%2f%2fgoogle%2ecom</a>

Way to Enhancement

Add helper function to opUtil.

It name "op_auto_link_for_mobile()"


Related issues

Related to opDiaryPlugin - Enhancement(機能追加・改善) #1323: モバイル自動リンクに対応 Fixed(完了) 2010-07-13
Related to OpenPNE 3 - Bug(バグ) #1641: モバイル自動リンクが半角英数以外が含まれるURLやメールアドレスを正しくリンクに変換しない New(新規) 2010-10-04

Associated revisions

Revision bba9401d (diff)
Added by Shogo Kawahara over 10 years ago

added op_auto_link_text_for_mobile() (fixes #1160)

Revision 65dea436 (diff)
Added by Shogo Kawahara over 10 years ago

fixed NOTICE of op_auto_link_text_for_mobile() (refs #1160)

Revision 1e9b8854 (diff)
Added by Shogo Kawahara over 10 years ago

fixed a template of member/profile on the mobile_frontend for autolink (fixes #1160)

Revision f7622712 (diff)
Added by Shogo Kawahara over 10 years ago

fixed op_auto_link_text_for_mobile() doesn't link phone-number correctly (refs #1160)

Revision 582b18a4 (diff)
Added by Shogo Kawahara over 10 years ago

fixed op_auto_link_text_for_mobile() as default_mobile_auto_link_type accepted ['all'] (refs #1160)

Revision f652845e (diff)
Added by Shogo Kawahara over 10 years ago

fixed op_auto_link_text_for_mobile(), because href attribute is not correct (refs #1160)

Revision d4f87ad8 (diff)
Added by Shogo Kawahara over 10 years ago

fixed _op_auto_links_urls() to use basename() (refs #1160)

Revision b9ce1054 (diff)
Added by Shogo Kawahara over 10 years ago

fixed _op_auto_links_urls(), bacause the regular expression is not correct (fixes #1160)

Revision b6f4812f (diff)
Added by Shogo Kawahara over 10 years ago

fixed _op_auto_links_urls(), because regular expression for script name is not correct (fixes #1160)

History

#1 Updated by Shogo Kawahara over 10 years ago

  • Status changed from New(新規) to Accepted(着手)
  • Assignee set to Shogo Kawahara
  • Target version set to OpenPNE 3.6beta1

#2 Updated by Shogo Kawahara over 10 years ago

テスターへ(業務連絡)

以下の項目をよくチェックしてください

  • URL中継ページ ( /proxy でセッションIDがURLに含まれていないか。特に Cookieの利用できない docomo端末で厳密にチェックしてください)

#3 Updated by Shogo Kawahara over 10 years ago

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

更新履歴 1e9b8854689b69361b60cf8c0345767f238c5cfb で適用されました。

#4 Updated by Shogo Kawahara over 10 years ago

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

#5 Updated by Rimpei Ogawa over 10 years ago

  • Status changed from Pending Review(レビュー待ち) to Rejected(差し戻し)

3点フィードバックします。

1. 内部リンクのURLのパス部分がなくなってしまう

例: http://example.com/hoge/fuga/member/search

<a href="/member/search">/member/search</a>
("/hoge/fuga" の部分がなくなっている)

.

2. 電話番号の末尾に不要な < が表示される

例: 06-6012-3456

<a href="tel:0660123456">
06-6012-3456<</a>

.

3. OpenPNE.yml の設定で default_mobile_auto_link_type: ['all'] とすると動かない

正しくは、 default_mobile_auto_link_type: 'all' ですが、実際にハマりました。追加説明が必要だと思います。

#6 Updated by Shogo Kawahara over 10 years ago

  • Status changed from Rejected(差し戻し) to Accepted(着手)

#7 Updated by Shogo Kawahara over 10 years ago

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

修正しました

#8 Updated by Rimpei Ogawa over 10 years ago

  • Status changed from Pending Review(レビュー待ち) to Rejected(差し戻し)

#9 Updated by Rimpei Ogawa over 10 years ago

  • Status changed from Rejected(差し戻し) to Accepted(着手)

#10 Updated by Rimpei Ogawa over 10 years ago

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

#11 Updated by Rimpei Ogawa over 10 years ago

  • Status changed from Pending Review(レビュー待ち) to Rejected(差し戻し)

_op_auto_links_urls()

  • script_name の抽出には basename() が使えると思います
  • 正規表現の (?:\/.*\.php)? の部分ですが、スクリプト名よりも後ろの部分に .php という文字列が出てくると意図通りにマッチしないので修正してください(例: http://example.com/index.php/diary/search?keyword=hoge.php

#12 Updated by Shogo Kawahara over 10 years ago

  • Status changed from Rejected(差し戻し) to Pending Review(レビュー待ち)

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

#13 Updated by Rimpei Ogawa over 10 years ago

  • Status changed from Pending Review(レビュー待ち) to Rejected(差し戻し)

正規表現の修正ですが、 http://example.com/diary/search?keyword=hoge.php のような URL ではまだ上手くいきません。

#14 Updated by Shogo Kawahara over 10 years ago

  • Status changed from Rejected(差し戻し) to Pending Review(レビュー待ち)

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

#15 Updated by Rimpei Ogawa over 10 years ago

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

#16 Updated by Kousuke Ebihara over 10 years ago

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

Also available in: Atom PDF