forked from Wavyzz/dolibarr
* fix CI v22 * Update test.php --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
69 lines
2.6 KiB
PHP
Executable File
69 lines
2.6 KiB
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
/**
|
|
* \file scripts/company/sync_contacts_dolibarr2ldap.php
|
|
* \ingroup ldap company
|
|
* \brief Script to update all contacts from Dolibarr into a LDAP database
|
|
*/
|
|
|
|
include "../../htdocs/master.inc.php";
|
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|
|
|
$langs->setDefaultLang('fr');
|
|
$langs->loadLangs(array('main', 'companies'));
|
|
|
|
$s = '<b>aa</b> & & a=%10';
|
|
print $s."\n";
|
|
//print dol_htmlentitiesbr($s)."\n";
|
|
//print dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'hr', 'span')), 1, -1, '', 0, 1);
|
|
print dolPrintHTMLForAttributeUrl('<b>aa</b> & & a=%10');
|
|
print "\n";
|
|
$s = 'aa & & a=%10';
|
|
print $s."\n";
|
|
//print dol_htmlentitiesbr($s)."\n";
|
|
//print dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'hr', 'span')), 1, -1, '', 0, 1);
|
|
print dolPrintHTMLForAttributeUrl('aa & & a=%10');
|
|
print "\n";
|
|
|
|
|
|
print $langs->tr("Preview");
|
|
print "\n";
|
|
print $langs->trans("Preview");
|
|
print "\n";
|
|
|
|
print ">>> dol_escape_htmltag(< > bb<b>bold ç &) - should not happen</b>\n";
|
|
print dol_escape_htmltag("< > bb<b>bold</b> ç &", 1);
|
|
print "\n";
|
|
print ">>> dol_escape_htmltag(< > bb<b>bold ç &)</b>\n";
|
|
print dol_escape_htmltag("< > bb<b>bold</b> ç &", 1);
|
|
print "\n";
|
|
print '>>> dol_escape_htmltag(<script>alert("azerty")</script>)'."\n";
|
|
print dol_escape_htmltag('<script>alert("azerty")</script>', 1);
|
|
print "\n";
|
|
|
|
print "\n";
|
|
|
|
// dol_escape_htmltag(dol_htmlwithnojs(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 1, 1, array())), 1, 1, 'common', 0, 1);
|
|
print ">>> dolPrintHTML(< > bb<b>bold</b> ç &) - should not happen\n";
|
|
print dolPrintHTML("< > bb<b>bold</b> ç &");
|
|
print "\n";
|
|
print ">>> dolPrintHTML(< > bb<b>bold</b> ç &)\n";
|
|
print dolPrintHTML("< > bb<b>bold</b> ç &");
|
|
print "\n";
|
|
print '>>> dolPrintHTML(<script>alert("azerty")</script>)'."\n";
|
|
print dolPrintHTML('<script>alert("azerty")</script>');
|
|
print "\n";
|
|
|
|
print "\n";
|
|
|
|
// dol_escape_htmltag(dol_string_onlythesehtmltags(dol_htmlentitiesbr($s), 1, 0, 0, 0, array('br', 'b', 'font', 'hr', 'span')), 1, -1, '', 0, 1);
|
|
print ">>> dolPrintHTMLForAttribute(< > bb<b>bold</b> ç & )\n";
|
|
print dolPrintHTMLForAttribute("< > bb<b>bold</b> ç &");
|
|
print "\n";
|
|
print ">>> dolPrintHTMLForAttribute(< > bb<b>bold</b> ç &)\n";
|
|
print dolPrintHTMLForAttribute("< > bb<b>bold</b> ç &");
|
|
print "\n";
|
|
print '>>> dolPrintHTMLForAttribute(<script>alert("azerty")</script>)'."\n";
|
|
print dolPrintHTMLForAttribute('<script>alert("azerty")</script>');
|
|
print "\n";
|