/ LJCPHPCodeDoc / LJCCommonLib / LJCCommon / Scrub


Parameters
$text - The text to be scrubbed.

Returns

The scrubbed value.

Syntax

PHP
public static function Scrub(string $text) : string

Returns a scrubbed external value. (E)

Remarks

Trims the text, strips slashes and converts HTML characters to HTML entities.

Example

PHP
 $webCommonPath = "c:/inetpub/wwwroot/LJCPHPCommon";
 require_once "$webCommonPath/LJCCommonLib.php";
 
 // $text = "<tag>"
 $text = LJCCommon::Scrub(" </tag> ");

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.