Source for file output.php
Documentation is available at output.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* @package Joomla.Platform
* Makes an object safe to display in forms
* Object parameters that are non-string, array, object or start with underscore
* @param object &$mixed An object to be parsed
* @param integer $quote_style The optional quote style for the htmlspecialchars function
* @param mixed $exclude_keys An optional string single field name or array of field names not
* to be parsed (eg, for a textarea)
public static function objectHTMLSafe(&$mixed, $quote_style =
ENT_QUOTES, $exclude_keys =
'')
if (is_string($exclude_keys) &&
$k ==
$exclude_keys)
* This method processes a string and replaces all instances of & with & in links only.
* @param string $input String to process
* @return string Processed string
$regex =
'href="([^"]*(&(amp;){0})[^"]*)*?"';
* This method processes a string and replaces all accented UTF-8 characters by unaccented
* ASCII-7 "equivalents", whitespaces are replaced by hyphens and the string is lowercase.
* @param string $string String to process
* @return string Processed string
// Remove any '-' from the string since they will be used as concatenaters
$str =
$lang->transliterate($str);
// Trim white spaces at beginning and end of alias and make lowercase
// Remove any duplicate whitespace, and ensure all characters are alphanumeric
// Trim dashes at beginning and end of alias
* This method implements unicode slugs instead of transliteration.
* @param string $string String to process
* @return string Processed string
// Replace double byte whitespaces by single byte (East Asian languages)
// Remove any '-' from the string as they will be used as concatenator.
// Would be great to let the spaces in but only Firefox is friendly with this
// Replace forbidden characters by whitespaces
$str =
preg_replace('#[:\#\*"@+=;!><&\.%()\]\/\'\\\\|\[]#', "\x20", $str);
// Trim white spaces at beginning and end of alias and make lowercase
// Remove any duplicate whitespace and replace whitespaces by hyphens
* Replaces & with & for XHTML compliance
* @param string $text Text to process
* @return string Processed string.
* @todo There must be a better way???
* Callback method for replacing & with & in a string
* @param string $m String to process
* @return string Replaced string
* Cleans text of all formatting and scripting code
* @param string &$text Text to clean
* @return string Cleaned text.
$text =
preg_replace("'<script[^>]*>.*?</script>'si", '', $text);
$text =
preg_replace('/<a\s+.*?href="([^"]+)"[^>]*>([^<]+)<\/a>/is', '\2 (\1)', $text);
* Strip img-tags from string
* @param string $string Sting to be cleaned.
* @return string Cleaned string
* Strip iframe-tags from string
* @param string $string Sting to be cleaned.
* @return string Cleaned string
Documentation generated on Tue, 19 Nov 2013 15:09:54 +0100 by phpDocumentor 1.4.3