PHP code example of tagged / out

1. Go to this page and download the library: Download tagged/out library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tagged / out example snippets




// blog post submitted by user
$userName  = '</script> I am an xss attacker';
$postTitle = 'I pwn you <script>pwn(home)</script>';
$postBody  = '<p>This html block <em>MUST</em> be well scrubbed or come from a trusted source.</p>';
$customCss = 'background:black;color:white;</style> XSS here';
$cdata     = 'Who uses this?';


<h1>Hello  out\text($name) 

<div id="content">
     out\html($content_html) 

<script>
    var data =  out\script(json_encode($data)) 

<style>
     out\style($css) 

<![CDATA[
     out\cdata($character_data) 

$encodedName = out\stext($name);
$content     = out\shtml($content_html);
$scriptData  = out\sscript(json_encode($data));
$styleData   = out\sstyle($css);
$cdataData   = out\scdata($character_data);