Better target="_blank" links
Added rel="noopener noreferrer" attribute.
This commit is contained in:
parent
3f304448cb
commit
82aec7a6da
@ -1593,7 +1593,7 @@ angular.module('izhukov.utils', [])
|
||||
html.push(
|
||||
'<a ',
|
||||
attr,
|
||||
contextExternal ? ' target="_blank" ' : '',
|
||||
contextExternal ? ' target="_blank" rel="noopener noreferrer" ' : '',
|
||||
' href="',
|
||||
contextUrl.replace('{1}', encodeURIComponent(username)),
|
||||
'">',
|
||||
@ -1625,7 +1625,7 @@ angular.module('izhukov.utils', [])
|
||||
var hashtag = entityText.substr(1)
|
||||
html.push(
|
||||
'<a ',
|
||||
contextExternal ? ' target="_blank" ' : '',
|
||||
contextExternal ? ' target="_blank" rel="noopener noreferrer" ' : '',
|
||||
'href="',
|
||||
contextUrl.replace('{1}', encodeURIComponent(hashtag))
|
||||
,
|
||||
@ -1643,7 +1643,7 @@ angular.module('izhukov.utils', [])
|
||||
html.push(
|
||||
'<a href="',
|
||||
encodeEntities('mailto:' + entityText),
|
||||
'" target="_blank">',
|
||||
'" target="_blank" rel="noopener noreferrer">',
|
||||
encodeEntities(entityText),
|
||||
'</a>'
|
||||
)
|
||||
@ -1660,7 +1660,7 @@ angular.module('izhukov.utils', [])
|
||||
html.push(
|
||||
'<a href="',
|
||||
encodeEntities(url),
|
||||
'" target="_blank">',
|
||||
'" target="_blank" rel="noopener noreferrer">',
|
||||
wrapRichNestedText(entityText, entity.nested, options),
|
||||
'</a>'
|
||||
)
|
||||
|
@ -1,4 +1,4 @@
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_geopoint">
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_geopoint">
|
||||
<i class="icon icon-geo-point"></i>
|
||||
<img
|
||||
class="im_message_venue_geopoint_image"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="im_message_venue clearfix">
|
||||
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_venue_geopoint_wrap">
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap">
|
||||
<i class="icon icon-geo-point"></i>
|
||||
<img
|
||||
class="im_message_venue_geopoint_image"
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
<div class="im_message_venue_info">
|
||||
<div class="im_message_venue_title_wrap">
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_document_name" ng-bind="::media.title"></a>
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_document_name" ng-bind="::media.title"></a>
|
||||
</div>
|
||||
<div class="im_message_venue_address" ng-bind="::media.address"></div>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div ng-show="media.webpage._ == 'webPage'" class="im_message_webpage_wrap clearfix" ng-switch="media.webpage.type">
|
||||
<div ng-switch-when="photo" class="im_message_webpage_photo">
|
||||
<div class="im_message_webpage_title">
|
||||
<a href="{{media.webpage.url}}" target="_blank" ng-bind-html="media.webpage.rTitle"></a>
|
||||
<a href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="media.webpage.rTitle"></a>
|
||||
</div>
|
||||
<div ng-if="media.webpage.description.length" class="im_message_webpage_description" ng-bind-html="media.webpage.rDescription"></div>
|
||||
<a class="im_message_photo_thumb" ng-click="openPhoto(media.webpage.photo.id, {w: media.webpage.id, m: messageId})" ng-style="::{width: media.webpage.photo.thumb.width + 'px'}" ng-mouseover="preloadPhoto(media.webpage.photo.id)">
|
||||
@ -16,10 +16,10 @@
|
||||
<div ng-switch-when="video" class="im_message_webpage_video">
|
||||
<div class="im_message_webpage_site" ng-bind="media.webpage.site_name || media.webpage.display_url"></div>
|
||||
<div class="im_message_webpage_title">
|
||||
<a ng-click="openEmbed($event)" href="{{media.webpage.url}}" target="_blank" ng-bind-html="media.webpage.rTitle"></a>
|
||||
<a ng-click="openEmbed($event)" href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="media.webpage.rTitle"></a>
|
||||
</div>
|
||||
<div ng-if="media.webpage.description.length" class="im_message_webpage_description" ng-bind-html="media.webpage.rDescription"></div>
|
||||
<a class="im_message_video_thumb" ng-click="openEmbed($event)" ng-href="{{media.webpage.url}}" target="_blank" ng-style="::{width: video.thumb.width + 'px'}">
|
||||
<a class="im_message_video_thumb" ng-click="openEmbed($event)" ng-href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" ng-style="::{width: video.thumb.width + 'px'}">
|
||||
<span ng-if="media.webpage.duration > 0" class="im_message_video_duration nocopy" data-content="{{::media.webpage.duration | duration}}"></span>
|
||||
<i class="icon icon-videoplay"></i>
|
||||
<img
|
||||
@ -37,13 +37,13 @@
|
||||
|
||||
<div ng-switch-when="gif" class="im_message_webpage_gif">
|
||||
<div class="im_message_webpage_title">
|
||||
<a href="{{media.webpage.url}}" target="_blank" ng-bind-html="media.webpage.rTitle"></a>
|
||||
<a href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="media.webpage.rTitle"></a>
|
||||
</div>
|
||||
<div my-message-document="media.webpage" message-id="messageId"></div>
|
||||
</div>
|
||||
|
||||
<div ng-switch-default class="im_message_webpage_article">
|
||||
<a ng-if="media.webpage.photo" href="{{media.webpage.url}}" target="_blank" class="im_message_webpage_article_photo pull-right">
|
||||
<a ng-if="media.webpage.photo" href="{{media.webpage.url}}" target="_blank" rel="noopener noreferrer" class="im_message_webpage_article_photo pull-right">
|
||||
<img
|
||||
class="im_message_article_thumb"
|
||||
my-load-thumb
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
<div class="media_modal_info_wrap pull-left" ng-if="webpageID">
|
||||
<div class="media_modal_author_name">
|
||||
<a class="media_modal_author" href="{{webpage.url}}" target="_blank" ng-bind-html="webpage.rTitle"></a>
|
||||
<a class="media_modal_author" href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="webpage.rTitle"></a>
|
||||
</div>
|
||||
<div class="media_modal_date" ng-bind="webpage.site_name || webpage.display_url"></div>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="im_message_venue clearfix">
|
||||
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_venue_geopoint_wrap">
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_venue_geopoint_wrap">
|
||||
<i class="icon icon-geo-point"></i>
|
||||
<img
|
||||
class="im_message_venue_geopoint_image"
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
<div class="im_message_venue_info">
|
||||
<div class="im_message_venue_title_wrap">
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" class="im_message_document_name" ng-bind="::media.title"></a>
|
||||
<a ng-href="{{::media.mapUrl}}" target="_blank" rel="noopener noreferrer" class="im_message_document_name" ng-bind="::media.title"></a>
|
||||
</div>
|
||||
<div class="im_message_venue_address" ng-bind="::media.address"></div>
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div ng-switch-when="photo" class="im_message_webpage_photo">
|
||||
<div class="im_message_webpage_site" ng-bind="webpage.site_name || webpage.display_url"></div>
|
||||
<div class="im_message_webpage_title">
|
||||
<a href="{{webpage.url}}" target="_blank" ng-bind-html="webpage.rTitle"></a>
|
||||
<a href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="webpage.rTitle"></a>
|
||||
</div>
|
||||
<div ng-if="webpage.description.length" class="im_message_webpage_description" ng-bind-html="webpage.rDescription"></div>
|
||||
<a class="im_message_photo_thumb" ng-click="openPhoto(webpage.photo.id, {w: webpage.id, m: messageId})" ng-style="::{width: webpage.photo.thumb.width + 'px'}" ng-mouseover="preloadPhoto(webpage.photo.id)">
|
||||
@ -16,10 +16,10 @@
|
||||
<div ng-switch-when="video" class="im_message_webpage_video">
|
||||
<div class="im_message_webpage_site" ng-bind="webpage.site_name || webpage.display_url"></div>
|
||||
<div class="im_message_webpage_title">
|
||||
<a ng-click="openEmbed($event)" href="{{webpage.url}}" target="_blank" ng-bind-html="webpage.rTitle"></a>
|
||||
<a ng-click="openEmbed($event)" href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="webpage.rTitle"></a>
|
||||
</div>
|
||||
<div ng-if="webpage.description.length" class="im_message_webpage_description" ng-bind-html="webpage.rDescription"></div>
|
||||
<a class="im_message_video_thumb" ng-click="openEmbed($event)" ng-href="{{webpage.url}}" target="_blank" ng-style="::{width: video.thumb.width + 'px'}">
|
||||
<a class="im_message_video_thumb" ng-click="openEmbed($event)" ng-href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" ng-style="::{width: video.thumb.width + 'px'}">
|
||||
<span ng-if="webpage.duration > 0" class="im_message_video_duration" ng-bind="::webpage.duration | duration"></span>
|
||||
<i class="icon icon-videoplay"></i>
|
||||
<img
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
<div ng-switch-default class="im_message_webpage_article">
|
||||
<div class="im_message_webpage_site" ng-bind="webpage.site_name"></div>
|
||||
<a ng-if="webpage.photo" href="{{webpage.url}}" target="_blank" class="im_message_webpage_article_photo pull-right">
|
||||
<a ng-if="webpage.photo" href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" class="im_message_webpage_article_photo pull-right">
|
||||
<img
|
||||
class="im_message_article_thumb"
|
||||
my-load-thumb
|
||||
@ -40,7 +40,7 @@
|
||||
/>
|
||||
</a>
|
||||
<div class="im_message_webpage_title">
|
||||
<a ng-click="openEmbed($event)" href="{{webpage.url}}" target="_blank" ng-bind-html="webpage.rTitle"></a>
|
||||
<a ng-click="openEmbed($event)" href="{{webpage.url}}" target="_blank" rel="noopener noreferrer" ng-bind-html="webpage.rTitle"></a>
|
||||
</div>
|
||||
<div ng-if="webpage.description.length" class="im_message_webpage_description" ng-bind-html="webpage.rDescription"></div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user