https://github.com/joomla-framework/filter
Joomla Framework Filter Package
https://github.com/joomla-framework/filter
filter joomla joomla-framework php validation
Last synced: 14 days ago
JSON representation
Joomla Framework Filter Package
- Host: GitHub
- URL: https://github.com/joomla-framework/filter
- Owner: joomla-framework
- License: gpl-2.0
- Created: 2013-02-24T03:20:58.000Z (about 12 years ago)
- Default Branch: 3.x-dev
- Last Pushed: 2025-04-01T09:47:22.000Z (25 days ago)
- Last Synced: 2025-04-03T22:09:27.167Z (23 days ago)
- Topics: filter, joomla, joomla-framework, php, validation
- Language: PHP
- Homepage:
- Size: 5.23 MB
- Stars: 15
- Watchers: 12
- Forks: 22
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# The Filter Package [](https://ci.joomla.org/joomla-framework/filter)
[](https://packagist.org/packages/joomla/filter)
[](https://packagist.org/packages/joomla/filter)
[](https://packagist.org/packages/joomla/filter)
[](https://packagist.org/packages/joomla/filter)## Installation via Composer
Add `"joomla/filter": "~3.0.*@dev"` to the require block in your composer.json and then run `composer install`.
```json
{
"require": {
"joomla/filter": "~3.0"
}
}
```Alternatively, you can simply run the following from the command line:
```sh
composer require joomla/filter "~3.0"
```If you want to include the test sources, use
```sh
composer require --prefer-source joomla/filter "~3.0"
```Note that the `Joomla\Language` package is an optional dependency and is only required if the application requires the use of `OutputFilter::stringURLSafe`.
## Upgrades from 1 to 2
Note the InputFilter static class constants have been renamed:| Before | After |
| ------------- | ------------- |
| InputFilter::TAGS_WHITELIST | InputFilter::ONLY_ALLOW_DEFINED_TAGS |
| InputFilter::TAGS_BLACKLIST | InputFilter::ONLY_BLOCK_DEFINED_TAGS |
| InputFilter::ATTR_WHITELIST | InputFilter::ONLY_ALLOW_DEFINED_ATTRIBUTES |
| InputFilter::ATTR_BLACKLIST | InputFilter::ONLY_BLOCK_DEFINED_ATTRIBUTES |The public property `InputFilter::tagBlacklist` has been renamed to `InputFilter::blockedTags`. Similarly
`InputFilter::attrBlacklist` has been renamed to `InputFilter::blockedAttributes`All code usage of these properties remains unchanged.