1
0
Fork 0
feedizer-php/htdocs/libraries/formsgeneration/test_javascript_string_escaping.php

35 lines
472 B
PHP
Raw Normal View History

2015-11-13 23:51:46 +01:00
<?php
/*
* test_javascript_string_escaping.php
*
* @(#) $Id: test_javascript_string_escaping.php,v 1.1 2008/02/04 05:58:20 mlemos Exp $
*
*/
require('forms.php');
$form = new form_class;
$strings = array(
'',
"\n",
"\r",
"\t",
'<',
'%',
'\'',
'\\',
chr(160),
"\n<",
"<%",
"<'",
"<\\",
"<\n",
"<\r",
"<\t",
' <',
);
$t = count($strings);
for($s = 0; $s < $t; ++$s)
echo $form->EncodeJavascriptString($strings[$s]), "\n";
?>