プロジェクト

全般

プロフィール

issue-3212.patch

Shinichi Urabe, 2012-09-27 02:12

ダウンロード (3.87 KB)

差分を表示:

apps/mobile_frontend/modules/default/actions/urlProxyAction.class.php
31 31
    }
32 32

  
33 33
    $this->url = $zendUri->getUri();
34
    $this->encordedUrl = urlencode($this->url);
34 35
    $this->proxys = sfConfig::get('op_mobile_proxys');
35 36
  }
36 37
}
apps/mobile_frontend/modules/default/templates/urlProxySuccess.php
11 11
<?php echo __('Use Proxy Site for Mobile') ?>
12 12
<?php foreach ($proxys as $name => $purl): ?>
13 13
<br>
14
<a href="<?php echo strpos($purl, '%s') ? sprintf($purl, urlencode($url)) : $purl.urlencode($url) ?>"<?php echo $i <= 9 ? 'accesskey="'.$i.'"' : '' ?>><?php echo ($i <= 9 ? $i++.'. ' : '').$name ?></a>
14
<a href="<?php echo strpos($purl, '%s') ? sprintf($purl, $encordedUrl) : $purl.$encordedUrl ?>"<?php echo $i <= 9 ? 'accesskey="'.$i.'"' : '' ?>><?php echo ($i <= 9 ? $i++.'. ' : '').$name ?></a>
15 15
<?php endforeach; ?>
16 16
<hr>
17 17
<?php endif; ?>
18 18
<a href="<?php echo $url ?>" accesskey="0"><?php echo '0. '.__('Direct link') ?></a><br>
19
<a href="mailto:?body=<?php echo urlencode($url) ?>" accesskey="*"><?php echo '*. '.__('Send this URL by E-mail') ?></a>
19
<a href="mailto:?body=<?php echo $encordedUrl ?>" accesskey="*"><?php echo '*. '.__('Send this URL by E-mail') ?></a>
20 20
<?php if ($sf_request->getMobile()->isDoCoMo()): ?>
21 21
<br><a href="<?php echo $url ?>" accesskey="#" ifb>#. フルブラウザ</a>
22 22
<?php elseif ($sf_request->getMobile()->isEZweb()): ?>
23
<br><a href="device:pcsiteviewer?url=<?php echo urlencode($url) ?>" accesskey="#" >#. PCサイトビューワ</a>
23
<br><a href="device:pcsiteviewer?url=<?php echo $encordedUrl ?>" accesskey="#" >#. PCサイトビューワ</a>
24 24
<?php endif; ?>
25 25

  
26 26
<?php slot('op_mobile_footer', ''); ?>
lib/helper/opUtilHelper.php
541 541
    }
542 542
    ';
543 543

  
544
  use_helper('Escaping');
544 545
  if ($truncate)
545 546
  {
546 547
    $callback_function .= '
547 548
      else if (strlen($matches[2].$matches[3]) > '.$truncate_len.')
548 549
      {
549
        return $matches[1].\'<a href="'.$proxyAction.'?url=\'.urlencode(($matches[2] == "www." ? "http://www." : $matches[2]).$matches[3]).\'"'.$href_options.'>\'.substr($matches[2].$matches[3], 0, '.$truncate_len.').\''.$pad.'</a>\'.$matches[4];
550
        return $matches[1].\'<a href="'.$proxyAction.'?url=\'.esc_specialchars(urlencode(htmlspecialchars_decode(($matches[2] == "www." ? "http://www." : $matches[2]).$matches[3], ENT_QUOTES))).\'"'.$href_options.'>\'.substr($matches[2].$matches[3], 0, '.$truncate_len.').\''.$pad.'</a>\'.$matches[4];
550 551
      }
551 552
      ';
552 553
  }
......
554 555
  $callback_function .= '
555 556
    else
556 557
    {
557
      return $matches[1].\'<a href="'.$proxyAction.'?url=\'.urlencode(($matches[2] == "www." ? "http://www." : $matches[2]).$matches[3]).\'"'.$href_options.'>\'.$matches[2].$matches[3].\'</a>\'.$matches[4];
558
      return $matches[1].\'<a href="'.$proxyAction.'?url=\'.esc_specialchars(urlencode(htmlspecialchars_decode(($matches[2] == "www." ? "http://www." : $matches[2]).$matches[3], ENT_QUOTES))).\'"'.$href_options.'>\'.$matches[2].$matches[3].\'</a>\'.$matches[4];
558 559
    }
559 560
    ';
560 561