Skip to content

Commit

Permalink
#5: Fixes vulnerability of target="_blank"
Browse files Browse the repository at this point in the history
  • Loading branch information
greeflas committed Dec 25, 2017
1 parent fc006c0 commit 970ef83
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 26 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
@@ -1,9 +1,9 @@
Social Share Change Log
=======================

2.0.0 Under development
1.4.1 December 25, 2017
-----------------------
* No changes in this release
* Fix #5: Fixes vulnerability of `target="_blank"`

1.4.0 December 12, 2017
-----------------------
Expand Down
16 changes: 8 additions & 8 deletions docs/guide-fr/configurator.md
Expand Up @@ -3,14 +3,14 @@ Le configurateur

## Les options de configurations

| Option | Description | Type | Défaut |
|-------------------|-----------------------------------------------------------------------------------|-------|-----------------------------------------------|
|socialNetworks |Le tableau des configurations des pilotes pour les réseaux sociaux |array |- |
|options |Les attributs HTML pour le lien du partage |array |- |
|enableSeoOptions |L’adjonction des attributs SEO marche/arrêt pour le lien |bool |true |
|seoOptions |Les attributs SEO pour le lien |array |`['target' => '_blank', 'rel' => 'nofollow']` |
|enableDefaultIcons |L’utilisation des icônes marche/arrêt à lieu des étiquettes de texte |bool |false |
|icons |Le tableau associatif avec le nom de classe de pilote et le secteur pour l’icône |array |Des icônes par défaut |
| Option | Description | Type | Défaut |
|-------------------|-----------------------------------------------------------------------------------|-------|-----------------------------------------------------------------------|
|socialNetworks |Le tableau des configurations des pilotes pour les réseaux sociaux |array |- |
|options |Les attributs HTML pour le lien du partage |array |- |
|enableSeoOptions |L’adjonction des attributs SEO marche/arrêt pour le lien |bool |true |
|seoOptions |Les attributs SEO pour le lien |array |`['target' => '_blank', 'rel' => 'noopener', 'rel' => 'nofollow']` |
|enableDefaultIcons |L’utilisation des icônes marche/arrêt à lieu des étiquettes de texte |bool |false |
|icons |Le tableau associatif avec le nom de classe de pilote et le secteur pour l’icône |array |Des icônes par défaut |

## L’exemple de configuration

Expand Down
16 changes: 8 additions & 8 deletions docs/guide-ru/configurator.md
Expand Up @@ -3,14 +3,14 @@

## Опции для настройки

| Опция | Описание | Тип данных | Стандартное значение |
|-------------------|-------------------------------------------------------------------|---------------|-----------------------------------------------|
|socialNetworks |Массив с настройками драйверов социальных сетей |array |- |
|options |HTML аттрибуты для ссылки |array |- |
|enableSeoOptions |Вкл/выкл добавление SEO аттрибутов для ссылки |bool |true |
|seoOptions |SEO аттрибуты для ссылки |array |`['target' => '_blank', 'rel' => 'nofollow']` |
|enableDefaultIcons |Вкл/выкл использование иконок вместо текстовых лэйблов |bool |false |
|icons |Ассоциативный массив с именем класса драйвера и селектором иконки |array |Используется стандартный набор иконок |
| Опция | Описание | Тип данных | Стандартное значение |
|-------------------|-------------------------------------------------------------------|---------------|-----------------------------------------------------------------------|
|socialNetworks |Массив с настройками драйверов социальных сетей |array |- |
|options |HTML аттрибуты для ссылки |array |- |
|enableSeoOptions |Вкл/выкл добавление SEO аттрибутов для ссылки |bool |true |
|seoOptions |SEO аттрибуты для ссылки |array |`['target' => '_blank', 'rel' => 'noopener', 'rel' => 'nofollow']` |
|enableDefaultIcons |Вкл/выкл использование иконок вместо текстовых лэйблов |bool |false |
|icons |Ассоциативный массив с именем класса драйвера и селектором иконки |array |Используется стандартный набор иконок |

## Примеры конфигурации

Expand Down
16 changes: 8 additions & 8 deletions docs/guide/configurator.md
Expand Up @@ -3,14 +3,14 @@ Configurator

## Configuration options

| Option | Description | Type | Default |
|-------------------|-------------------------------------------------------|-------|-----------------------------------------------|
|socialNetworks |Array with configuration for social network drivers |array |- |
|options |HTML options for share-links |array |- |
|enableSeoOptions |Enable/disable appending of SEO options to share links |bool |true |
|seoOptions |SEO options for share-links |array |`['target' => '_blank', 'rel' => 'nofollow']` |
|enableDefaultIcons |Enable/disable default icons instead of text labels |bool |false |
|icons |Array with drivers names and icons selectors |array |Default icons set will be used |
| Option | Description | Type | Default |
|-------------------|-------------------------------------------------------|-------|-----------------------------------------------------------------------|
|socialNetworks |Array with configuration for social network drivers |array |- |
|options |HTML options for share-links |array |- |
|enableSeoOptions |Enable/disable appending of SEO options to share links |bool |true |
|seoOptions |SEO options for share-links |array |`['target' => '_blank', 'rel' => 'noopener', 'rel' => 'nofollow']` |
|enableDefaultIcons |Enable/disable default icons instead of text labels |bool |false |
|icons |Array with drivers names and icons selectors |array |Default icons set will be used |

## Configuration examples

Expand Down
1 change: 1 addition & 0 deletions src/configurators/Configurator.php
Expand Up @@ -62,6 +62,7 @@ public function init()
if (empty($this->seoOptions)) {
$this->seoOptions = [
'target' => '_blank',
'rel' => 'noopener',
'rel' => 'nofollow',
];
}
Expand Down

0 comments on commit 970ef83

Please sign in to comment.