Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2021-12-17 (7 days ago) | | Not yet rated by the users | | Total: 45 This week: 45 | | All time: 10,209 This week: 3 |
|
Description | | Author |
This is a simple class that can check if an HTML string contains special characters.
It takes a string with HTML tags and searches it to find characters like < , > and & .
The class returns true if any HTML special characters are found. | |
|
|
Innovation award
Nominee: 2x |
|
Details
What is is_htmlspecialchars ?
This package serves to check whether the data shared with it contains HTML special characters. The data must be specified in string
type. Returns true
if the HTML contains special characters, otherwise false
.
data:
$code = 'merhaba <?=$this->timestamp;?>';
Out-of-class use:
code:
require_once('Mind.php');
if($m::aliyilmaz('is_htmlspecialchars')->is_htmlspecialchars($code)){
echo 'HTML contains special characters.';
} else {
echo 'HTML does not contain special characters';
}
When using it in the class:
code:
if(self::aliyilmaz('is_htmlspecialchars')->is_htmlspecialchars($code)){
echo 'HTML contains special characters.';
} else {
echo 'HTML does not contain special characters';
}
output:
HTML contains special characters.
Dependencies
This package has no dependencies.
License
Instructions and files in this directory are shared under the GPL3 license.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.