Skip to content

Commit

Permalink
[*]: "To people of Russia" -> Info about the war in Ukraine
Browse files Browse the repository at this point in the history
  • Loading branch information
voku committed Mar 8, 2022
1 parent a659a2a commit 2e6696d
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 5 deletions.
70 changes: 67 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[//]: # (AUTO-GENERATED BY "PHP README Helper": base file -> docs/base.md)
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

[![Build Status](https://github.com/voku/anti-xss/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/voku/anti-xss/actions)
[![codecov.io](http://codecov.io/github/voku/anti-xss/coverage.svg?branch=master)](http://codecov.io/github/voku/anti-xss?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8e3c9da417124971b8d8e0c1046c24c7)](https://www.codacy.com/app/voku/anti-xss)
Expand Down Expand Up @@ -147,13 +149,17 @@ composer install
<p id="voku-php-readme-class-methods"></p><table><tr><td><a href="#adddonotclosehtmltagsstring-strings-this">addDoNotCloseHtmlTags</a>
</td><td><a href="#addevilattributesstring-strings-this">addEvilAttributes</a>
</td><td><a href="#addevilhtmltagsstring-strings-this">addEvilHtmlTags</a>
</td><td><a href="#addneverallowedcallstringsstring-strings-this">addNeverAllowedCallStrings</a>
</td></tr><tr><td><a href="#addneverallowedjscallbackregexstring-strings-this">addNeverAllowedJsCallbackRegex</a>
</td><td><a href="#addneverallowedoneventsafterwardsstring-strings-this">addNeverAllowedOnEventsAfterwards</a>
</td></tr><tr><td><a href="#addneverallowedregexstring-strings-this">addNeverAllowedRegex</a>
</td><td><a href="#addneverallowedregexstring-strings-this">addNeverAllowedRegex</a>
</td><td><a href="#addneverallowedstrafterwardsstring-strings-this">addNeverAllowedStrAfterwards</a>
</td><td><a href="#isxssfound-boolnull">isXssFound</a>
</td></tr><tr><td><a href="#isxssfound-boolnull">isXssFound</a>
</td><td><a href="#removedonotclosehtmltagsstring-strings-this">removeDoNotCloseHtmlTags</a>
</td></tr><tr><td><a href="#removeevilattributesstring-strings-this">removeEvilAttributes</a>
</td><td><a href="#removeevilattributesstring-strings-this">removeEvilAttributes</a>
</td><td><a href="#removeevilhtmltagsstring-strings-this">removeEvilHtmlTags</a>
</td></tr><tr><td><a href="#removeneverallowedcallstringsstring-strings-this">removeNeverAllowedCallStrings</a>
</td><td><a href="#removeneverallowedjscallbackregexstring-strings-this">removeNeverAllowedJsCallbackRegex</a>
</td><td><a href="#removeneverallowedoneventsafterwardsstring-strings-this">removeNeverAllowedOnEventsAfterwards</a>
</td><td><a href="#removeneverallowedregexstring-strings-this">removeNeverAllowedRegex</a>
</td></tr><tr><td><a href="#removeneverallowedstrafterwardsstring-strings-this">removeNeverAllowedStrAfterwards</a>
Expand Down Expand Up @@ -198,6 +204,30 @@ Add some strings to the "_evil_html_tags"-array.

--------

## addNeverAllowedCallStrings(string[] $strings): $this
<a href="#voku-php-readme-class-methods">↑</a>
Add some strings to the "_never_allowed_call_strings"-array.

**Parameters:**
- `string[] $strings`

**Return:**
- `$this`

--------

## addNeverAllowedJsCallbackRegex(string[] $strings): $this
<a href="#voku-php-readme-class-methods">↑</a>
Add some strings to the "_never_allowed_js_callback_regex"-array.

**Parameters:**
- `string[] $strings`

**Return:**
- `$this`

--------

## addNeverAllowedOnEventsAfterwards(string[] $strings): $this
<a href="#voku-php-readme-class-methods">↑</a>
Add some strings to the "_never_allowed_on_events_afterwards"-array.
Expand Down Expand Up @@ -297,6 +327,40 @@ WARNING: Use this method only if you have a really good reason.

--------

## removeNeverAllowedCallStrings(string[] $strings): $this
<a href="#voku-php-readme-class-methods">↑</a>
Remove some strings from the "_never_allowed_call_strings"-array.

<p>
<br />
WARNING: Use this method only if you have a really good reason.
</p>

**Parameters:**
- `string[] $strings`

**Return:**
- `$this`

--------

## removeNeverAllowedJsCallbackRegex(string[] $strings): $this
<a href="#voku-php-readme-class-methods">↑</a>
Remove some strings from the "_never_allowed_js_callback_regex"-array.

<p>
<br />
WARNING: Use this method only if you have a really good reason.
</p>

**Parameters:**
- `string[] $strings`

**Return:**
- `$this`

--------

## removeNeverAllowedOnEventsAfterwards(string[] $strings): $this
<a href="#voku-php-readme-class-methods">↑</a>
Remove some strings from the "_never_allowed_on_events_afterwards"-array.
Expand Down
2 changes: 2 additions & 0 deletions build/docs/base.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

[![Build Status](https://github.com/voku/anti-xss/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/voku/anti-xss/actions)
[![codecov.io](http://codecov.io/github/voku/anti-xss/coverage.svg?branch=master)](http://codecov.io/github/voku/anti-xss?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8e3c9da417124971b8d8e0c1046c24c7)](https://www.codacy.com/app/voku/anti-xss)
Expand Down
18 changes: 16 additions & 2 deletions src/voku/helper/AntiXSS.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,23 @@
use const HTML_ENTITIES;

/**
* AntiXSS
* AntiXSS - ported from "CodeIgniter"
*
* ported from "CodeIgniter"
* ## 🇷🇺 Русским гражданам
* В Украине сейчас идет война. Силами РФ наносятся удары по гражданской инфраструктуре в [Харькове][1], [Киеве][2], [Чернигове][3], [Сумах][4], [Ирпене][5] и десятках других городов. Гибнут люди - и гражданское население, и военные, в том числе российские призывники, которых бросили воевать. Чтобы лишить собственный народ доступа к информации, правительство РФ запретило называть войну войной, закрыло независимые СМИ и принимает сейчас ряд диктаторских законов. Эти законы призваны заткнуть рот всем, кто против войны. За обычный призыв к миру сейчас можно получить несколько лет тюрьмы.
* Не молчите! Молчание - знак вашего согласия с политикой российского правительства.
* **Вы можете сделать выбор НЕ МОЛЧАТЬ.**
* ---
* ## 🇺🇸 To people of Russia
* There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilian infrastructure in [Kharkiv][1], [Kyiv][2], [Chernihiv][3], [Sumy][4], [Irpin][5] and dozens of other cities. People are dying – both civilians and military servicemen, including Russian conscripts who were thrown into the fighting. In order to deprive its own people of access to information, the government of the Russian Federation has forbidden calling a war a war, shut down independent media and is passing a number of dictatorial laws. These laws are meant to silence all those who are against war. You can be jailed for multiple years for simply calling for peace.
* Do not be silent! Silence is a sign that you accept the Russian government's policy.
* **You can choose NOT TO BE SILENT.**
* ---
* - [1] https://cloudfront-us-east-2.images.arcpublishing.com/reuters/P7K2MSZDGFMIJPDD7CI2GIROJI.jpg "Kharkiv under attack"
* - [2] https://gdb.voanews.com/01bd0000-0aff-0242-fad0-08d9fc92c5b3_cx0_cy5_cw0_w1023_r1_s.jpg "Kyiv under attack"
* - [3] https://ichef.bbci.co.uk/news/976/cpsprodpb/163DD/production/_123510119_hi074310744.jpg "Chernihiv under attack"
* - [4] https://www.youtube.com/watch?v=8K-bkqKKf2A "Sumy under attack"
* - [5] https://cloudfront-us-east-2.images.arcpublishing.com/reuters/K4MTMLEHTRKGFK3GSKAT4GR3NE.jpg "Irpin under attack"
*
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
Expand Down

0 comments on commit 2e6696d

Please sign in to comment.