fix #2142 onclick이 사용된 새 창 열기를 target 속성으로 변경

- 통합검색 모듈 misol_town 스킨도 마찬가지로 수정
This commit is contained in:
bnu 2017-09-08 15:21:14 +09:00 committed by Kijin Sung
parent 1bf96e646e
commit 3ee3d63cb7
32 changed files with 48 additions and 49 deletions

View file

@ -526,7 +526,7 @@ class content extends WidgetHandler
$content_item->setTitle($item->title);
$content_item->setNickName(max($item->author,$item->{'dc:creator'}));
//$content_item->setCategory($item->category);
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->description);
$item->description = preg_replace('!<a href=!is','<a target="_blank" rel="noopener" href=', $item->description);
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size));
$content_item->setThumbnail($this->_getRssThumbnail($item->description));
$content_item->setLink($item->link);
@ -565,7 +565,7 @@ class content extends WidgetHandler
$content_item->setTitle($item->title);
$content_item->setNickName(max($item->author,$item->{'dc:creator'}));
//$content_item->setCategory($item->category);
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->description);
$item->description = preg_replace('!<a href=!is','<a target="_blank" rel="noopener" href=', $item->description);
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size));
$content_item->setThumbnail($this->_getRssThumbnail($item->description));
$content_item->setLink($item->link);
@ -637,7 +637,7 @@ class content extends WidgetHandler
//$content_item->setCategory($item->category);
$item->description = ($item->content) ? $item->content : $item->description = $item->summary;
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->description);
$item->description = preg_replace('!<a href=!is','<a target="_blank" rel="noopener" href=', $item->description);
if(($item->content && stripos($value->content->attrs->type, "html") === FALSE) || (!$item->content && stripos($value->summary->attrs->type, "html") === FALSE))
{