fix some wrong case usages of new Api\Html class

This commit is contained in:
Ralf Becker 2016-03-29 09:13:46 +00:00
parent db5533058d
commit 2bd9c7c7e5
4 changed files with 6 additions and 7 deletions

View File

@ -75,7 +75,7 @@ class HtmlArea extends Etemplate\Widget
// only purify for html, mode "ascii" is NO html and content get lost!
if ($this->attrs['mode'] != 'ascii')
{
$value = Api\Html::purify($value, $this->attrs['validation_rules']);
$value = Api\Html\HtmLawed::purify($value, $this->attrs['validation_rules']);
}
$valid =& self::get_array($validated, $form_name, true);
if (true) $valid = $value;

View File

@ -665,7 +665,6 @@ egw_LAB.wait(function() {
*/
static function link($_url,$vars='')
{
//echo "<p>html::link(url='$url',vars='"; print_r($vars); echo "')</p>\n";
if (!is_array($vars))
{
parse_str($vars,$vars);
@ -779,7 +778,7 @@ egw_LAB.wait(function() {
continue; // parameter
}
// get the current part from the optional 'h' or 'f' prefix of the key
$p = $key[0] == 'h' ? html::THEAD : ($key[0] == 'f' ? html::TFOOT : html::TBODY);
$p = $key[0] == 'h' ? self::THEAD : ($key[0] == 'f' ? self::TFOOT : self::TBODY);
if ($part < $p && ($part || $p < self::TBODY)) // add only allowed and neccessary transitions
{
if ($part) $html .= '</'.self::$part2tag[$part].">\n";
@ -977,7 +976,7 @@ egw_LAB.wait(function() {
{
$url = self::link($url,$vars);
}
//echo "<p>html::a_href('".self::htmlspecialchars($content)."','$url',".print_r($vars,True).") = ".self::link($url,$vars)."</p>";
//echo "<p>self::a_href('".self::htmlspecialchars($content)."','$url',".print_r($vars,True).") = ".self::link($url,$vars)."</p>";
return '<a href="'.self::htmlspecialchars($url).'" '.$options.'>'.$content.'</a>';
}

View File

@ -212,13 +212,13 @@ class CkEditorConfig
{
//Get the skin name
$skin = $GLOBALS['egw_info']['user']['preferences']['common']['rte_skin'];
//error_log(__METHOD__.__LINE__.' UserAgent:'.html::$user_agent);
//error_log(__METHOD__.__LINE__.' UserAgent:'.EGroupware\Api\Header\UserAgent::type());
//Convert old fckeditor skin names to new ones
switch ($skin)
{
case 'kama':
$skin = "kama";
//if (html::$user_agent=='firefox' || html::$user_agent=='msie') $skin='moonocolor';
//if (EGroupware\Api\Header\UserAgent::type()=='firefox' || EGroupware\Api\Header\UserAgent::type()=='msie') $skin='moonocolor';
break;
case 'silver':
case 'moono-dark':

View File

@ -4196,7 +4196,7 @@ class Mail
// purify got switched to htmLawed
// some testcode to test purifying / htmlawed
//$_html = "<BLOCKQUOTE>hi <div> there </div> kram <br> </blockquote>".$_html;
$_html = html::purify($_html,self::$htmLawed_config,array(),true);
$_html = Html\HtmLawed::purify($_html,self::$htmLawed_config,array(),true);
//if ($hasOther) $_html = $matches[1]. $_html. $matches[3];
// clean out comments , should not be needed as purify should do the job.
$search = array(