You are here

function csstidy_print::_htmlsp in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 advagg_css_compress/csstidy/class.csstidy_print.inc \csstidy_print::_htmlsp()

Same as htmlspecialchars, only that chars are not replaced if $plain !== true. This makes print_code() cleaner.

@access private @version 1.0

Parameters

string $string:

bool $plain:

Return value

string

See also

csstidy_print::_print()

1 call to csstidy_print::_htmlsp()
csstidy_print::_print in advagg_css_compress/csstidy/class.csstidy_print.inc
Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain

File

advagg_css_compress/csstidy/class.csstidy_print.inc, line 353

Class

csstidy_print
CSS Printing class

Code

function _htmlsp($string, $plain) {
  if (!$plain) {
    return htmlspecialchars($string, ENT_QUOTES, 'utf-8');
  }
  return $string;
}