2017 © Pedro Peláez
 

yii2-extension safe-text

Hiding personal data(email, phone, etc.) from spam grabbing

image

demi/safe-text

Hiding personal data(email, phone, etc.) from spam grabbing

  • Saturday, February 10, 2018
  • by demi
  • Repository
  • 2 Watchers
  • 4 Stars
  • 107 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 4 % Grown

The README.md

Yii2-safe-text

Yii2 extension for hiding personal data(email, phone, etc.) from spam grabbing, (*1)

Installation

Run, (*2)

composer require "demi/safe-text" "~1.0"

Usage

Hide phone number:

<?= \demi\safeText\Widget::widget(['text' => '+555 478 24 75']) ?>

will be generated:, (*3)

document.write(["5","7"," ","4","2"," ","8","7","4"," ","5","5","5","+"].reverse().join(''));

Hide email:

<?= \demi\safeText\Widget::widget([
    'url' => 'mailto:example@gmail.com',
    'text' => 'example@gmail.com',
]) ?>

will be generated:, (*4)

(function() {
    var a = document.createElement('a');
    a.href = ["m","o","c",".","l","i","a","m","g","@","e","l","p","m","a","x","e",":","o","t","l","i","a","m"].reverse().join('');
    var text = ["m","o","c",".","l","i","a","m","g","@","e","l","p","m","a","x","e"].reverse().join('');
    var template = '{text}';
    a.innerHTML = template.replace('{text}', text);

    document.write(a.outerHTML);
}());

Options

All widget options, (*5)

<?= \demi\safeText\Widget::widget([
    'url' => 'skype:girlfriend?chat',
    'text' => 'girlfriend',
    'linkTextTemplate' => '<i class="fa fa-skype"></i> {text}',
    'linkOptions' => [
        'class' => 'skype-link',
        'target' => '_blank',
    ],
]) ?>

will be generated:, (*6)

(function() {
    var a = document.createElement('a');
    a.href = ["t","a","h","c","?","d","n","e","i","r","f","l","r","i","g",":","e","p","y","k","s"].reverse().join('');
    a.setAttribute('class', 'skype-link');
    a.setAttribute('target', '_blank');
    var text = ["d","n","e","i","r","f","l","r","i","g"].reverse().join('');
    var template = '<i class="fa fa-skype"></i> {text}';
    a.innerHTML = template.replace('{text}', text);

    document.write(a.outerHTML);
}());

The Versions

10/02 2018

dev-master

9999999-dev https://github.com/demisang/yii2-safe-text#readme

Hiding personal data(email, phone, etc.) from spam grabbing

  Sources   Download

GNU GPL-3.0-or-later

The Requires

 

email yii2 data phone antispam hide personal grabbing

10/02 2018

1.0.2

1.0.2.0 https://github.com/demisang/yii2-safe-text#readme

Hiding personal data(email, phone, etc.) from spam grabbing

  Sources   Download

GPL-3.0-or-later

The Requires

 

email yii2 data phone antispam hide personal grabbing

25/10 2015

1.0.1

1.0.1.0 https://github.com/demisang/yii2-safe-text#readme

Hiding personal data(email, phone, etc.) from spam grabbing

  Sources   Download

GNU

The Requires

 

email yii2 data phone antispam hide personal grabbing

25/10 2015

1.0.0

1.0.0.0 https://github.com/demisang/yii2-safe-text#readme

Hiding personal data(email, phone, etc.) from spam grabbing

  Sources   Download

GNU

The Requires

 

email yii2 data phone antispam hide personal grabbing