|
XOOPS
2.6.0
|

Public Member Functions | |
| __construct () | |
| addSlashes ($text) | |
| censorString (&$text) | |
| codeConv ($text, $xcode=1) | |
| codeConvCallback ($match) | |
| codePreConv ($text, $xcode=1) | |
| displayTarea ($text, $html=0, $smiley=1, $xcode=1, $image=1, $br=1) | |
| executeExtension ($name) | |
| executeExtensions () | |
| filterXss ($text) | |
| getSmileys ($isAll=true) | |
| htmlSpecialChars ($text, $quote_style=ENT_QUOTES, $charset=null, $double_encode=true) | |
| loadConfig ($name=null) | |
| loadExtension ($name) | |
| makeClickable (&$text) | |
| makeClickableCallback01 ($match) | |
| makeClickableCallback02 ($match) | |
| makeClickableCallback03 ($match) | |
| makeClickableCallback04 ($match) | |
| mergeConfig ($config_default, $config_custom) | |
| nl2Br ($text) | |
| previewTarea ($text, $html=0, $smiley=1, $xcode=1, $image=1, $br=1) | |
| quoteConv ($text) | |
| smiley ($message) | |
| stripSlashesGPC ($text) | |
| textFilter ($text, $force=false) | |
| undoHtmlSpecialChars ($text) | |
| xoopsCodeDecode (&$text, $allowimage=1) | |
Static Public Member Functions | |
| static | getInstance () |
| static | truncate ($text) |
Public Attributes | |
| $callbackPatterns = array() | |
| $callbacks = array() | |
| $censorConf | |
| $config = array() | |
| $path_basic | |
| $path_plugin | |
| $patterns = array() | |
| $replacements = array() | |
| $smileys = array() | |
| $text = "" | |
Definition at line 157 of file module.textsanitizer.php.
| MyTextSanitizer::__construct | ( | ) |
Definition at line 204 of file module.textsanitizer.php.
References $xoops_root_path, XoopsBaseConfig\get(), and loadConfig().

| MyTextSanitizer::addSlashes | ( | $text | ) |
Add slashes to the text if magic_quotes_gpc is turned off.
| string | $text |
Definition at line 505 of file module.textsanitizer.php.
References $text.
| MyTextSanitizer::censorString | ( | & | $text | ) |
Replaces banned words in a string with their replacements
| string | $text |
Definition at line 624 of file module.textsanitizer.php.
References $text, and executeExtension().

| MyTextSanitizer::codeConv | ( | $text, | |
$xcode = 1 |
|||
| ) |
| string | $text | |
| int | $xcode |
Definition at line 670 of file module.textsanitizer.php.
References $patterns, and $text.
Referenced by displayTarea().

| MyTextSanitizer::codeConvCallback | ( | $match | ) |
Definition at line 657 of file module.textsanitizer.php.
References executeExtension().

| MyTextSanitizer::codePreConv | ( | $text, | |
$xcode = 1 |
|||
| ) |
MyTextSanitizer::codePreConv()
| string | $text | |
| int | $xcode |
Definition at line 640 of file module.textsanitizer.php.
References $patterns, and $text.
Referenced by displayTarea().

| MyTextSanitizer::displayTarea | ( | $text, | |
$html = 0, |
|||
$smiley = 1, |
|||
$xcode = 1, |
|||
$image = 1, |
|||
$br = 1 |
|||
| ) |
Filters textarea form data in DB for display
| string | $text | |
| int | $html | allow html? |
| int | $smiley | allow smileys? |
| int | $xcode | allow xoopscode? |
| int | $image | allow inline images? |
| int | $br | convert linebreaks? |
Definition at line 568 of file module.textsanitizer.php.
References $html, $image, $text, codeConv(), codePreConv(), filterXss(), htmlSpecialChars(), makeClickable(), nl2Br(), smiley(), and xoopsCodeDecode().
Referenced by previewTarea().


| MyTextSanitizer::executeExtension | ( | $name | ) |
MyTextSanitizer::executeExtension()
| string | $name |
Definition at line 730 of file module.textsanitizer.php.
References $name, and loadExtension().
Referenced by censorString(), codeConvCallback(), executeExtensions(), and textFilter().


| MyTextSanitizer::executeExtensions | ( | ) |
MyTextSanitizer::executeExtensions()
Definition at line 687 of file module.textsanitizer.php.
References executeExtension().
Referenced by xoopsCodeDecode().


| MyTextSanitizer::filterXss | ( | $text | ) |
A quick solution for filtering XSS scripts
| string | $text |
Definition at line 472 of file module.textsanitizer.php.
References $patterns, $replacements, and $text.
Referenced by displayTarea(), and MytsTextfilter\load().

|
static |
Access the only instance of this class
Definition at line 254 of file module.textsanitizer.php.
Referenced by CommentsCommentForm\__construct(), b_system_info_show(), Xoops\Core\Kernel\XoopsObject\cleanVars(), Xoops\Form\DhtmlTextArea\codeIcon(), createConfigform(), Xoops_Utils\dumpVar(), SmiliesCorePreload\eventCoreClassModuleTextsanitizerSmiley(), XoopsBlock\getContent(), UserconfigsConfigsForm\getForm(), SystemPreferencesForm\getForm(), Xoops\Core\Kernel\Model\Read\getList(), Xoops\getRank(), XoopsUser\getUnameFromId(), XoopsUserUtility\getUnameFromId(), XoopsUserUtility\getUnameFromIds(), xoopslists\getUserRankList(), Xoops\Core\Kernel\Dtype\DtypeAbstract\init(), MyTextSanitizerExtension\loadConfig(), Xmf\Utilities\purifyText(), truncate(), XoopsUserUtility\validate(), xoBoolField(), xoFormField(), xoFormFieldCharset(), xoFormFieldCollation(), and xoPassField().

| MyTextSanitizer::getSmileys | ( | $isAll = true | ) |
Get the smileys
| bool | $isAll | TRUE for all smileys, FALSE for smileys with display = 1 |
Definition at line 270 of file module.textsanitizer.php.
References $smileys, and Xoops\Core\Events\getInstance().

| MyTextSanitizer::htmlSpecialChars | ( | $text, | |
$quote_style = ENT_QUOTES, |
|||
$charset = null, |
|||
$double_encode = true |
|||
| ) |
Convert special characters to HTML entities
| string | $text | string being converted |
| int | $quote_style | |
| string | $charset | character set used in conversion |
| bool | $double_encode |
Definition at line 536 of file module.textsanitizer.php.
References $text, and Xoops_Locale_Abstract\getCharset().
Referenced by displayTarea().


| MyTextSanitizer::loadConfig | ( | $name = null | ) |
| string | $name |
Definition at line 216 of file module.textsanitizer.php.
References $file, $name, XoopsLoad\fileExists(), MyTextSanitizerExtension\loadConfig(), and mergeConfig().
Referenced by __construct().


| MyTextSanitizer::loadExtension | ( | $name | ) |
MyTextSanitizer::loadExtension()
| string | $name |
Definition at line 705 of file module.textsanitizer.php.
References $file, $name, and XoopsLoad\fileExists().
Referenced by executeExtension().


| MyTextSanitizer::makeClickable | ( | & | $text | ) |
Make links in the text clickable
| string | $text |
Definition at line 318 of file module.textsanitizer.php.
References $text.
Referenced by displayTarea().

| MyTextSanitizer::makeClickableCallback01 | ( | $match | ) |
Definition at line 291 of file module.textsanitizer.php.
References truncate().

| MyTextSanitizer::makeClickableCallback02 | ( | $match | ) |
Definition at line 296 of file module.textsanitizer.php.
| MyTextSanitizer::makeClickableCallback03 | ( | $match | ) |
Definition at line 301 of file module.textsanitizer.php.
References truncate().

| MyTextSanitizer::makeClickableCallback04 | ( | $match | ) |
Definition at line 306 of file module.textsanitizer.php.
| MyTextSanitizer::mergeConfig | ( | $config_default, | |
| $config_custom | |||
| ) |
| array | $config_default | |
| array | $config_custom |
Definition at line 234 of file module.textsanitizer.php.
Referenced by loadConfig().

| MyTextSanitizer::nl2Br | ( | $text | ) |
Convert linebreaks to
tags
| string | $text |
Definition at line 494 of file module.textsanitizer.php.
References $text.
Referenced by displayTarea().

| MyTextSanitizer::previewTarea | ( | $text, | |
$html = 0, |
|||
$smiley = 1, |
|||
$xcode = 1, |
|||
$image = 1, |
|||
$br = 1 |
|||
| ) |
Filters textarea form data submitted for preview
| string | $text | |
| int | $html | allow html? |
| int | $smiley | allow smileys? |
| int | $xcode | allow xoopscode? |
| int | $image | allow inline images? |
| int | $br | convert linebreaks? |
Definition at line 611 of file module.textsanitizer.php.
References $html, $image, $text, displayTarea(), and stripSlashesGPC().

| MyTextSanitizer::quoteConv | ( | $text | ) |
Convert quote tags
| string | $text |
Definition at line 449 of file module.textsanitizer.php.
References $count, $text, and XoopsLocaleEn_US\C_QUOTE.
Referenced by xoopsCodeDecode().

| MyTextSanitizer::smiley | ( | $message | ) |
Replace emoticons in the message with smiley images
| string | $message |
Definition at line 283 of file module.textsanitizer.php.
References Xoops\Core\Events\getInstance().
Referenced by displayTarea().


| MyTextSanitizer::stripSlashesGPC | ( | $text | ) |
if magic_quotes_gpc is on, stirip back slashes
| string | $text |
Definition at line 519 of file module.textsanitizer.php.
References $text.
Referenced by previewTarea().

| MyTextSanitizer::textFilter | ( | $text, | |
$force = false |
|||
| ) |
Filter out possible malicious text kses project at SF could be a good solution to check
| string | $text | text to filter |
| bool | $force | force filtering |
Definition at line 746 of file module.textsanitizer.php.
References $text, and executeExtension().

|
static |
| mixed | $text |
Definition at line 365 of file module.textsanitizer.php.
References $text, and getInstance().
Referenced by makeClickableCallback01(), and makeClickableCallback03().


| MyTextSanitizer::undoHtmlSpecialChars | ( | $text | ) |
Reverses htmlSpecialChars()
| string | $text |
Definition at line 552 of file module.textsanitizer.php.
References $text.
Referenced by MytsSyntaxhighlight\load().

| MyTextSanitizer::xoopsCodeDecode | ( | & | $text, |
$allowimage = 1 |
|||
| ) |
Replace XoopsCodes with their equivalent HTML formatting
| string | $text | |
| int | $allowimage | Allow images in the text? On FALSE, uses links to images. |
Definition at line 387 of file module.textsanitizer.php.
References $callbackPatterns, $count, $i, $patterns, $replacements, $text, $xoops_url, executeExtensions(), XoopsBaseConfig\get(), and quoteConv().
Referenced by displayTarea().


| MyTextSanitizer::$callbackPatterns = array() |
Definition at line 185 of file module.textsanitizer.php.
Referenced by xoopsCodeDecode().
| MyTextSanitizer::$callbacks = array() |
Definition at line 186 of file module.textsanitizer.php.
| MyTextSanitizer::$censorConf |
Definition at line 167 of file module.textsanitizer.php.
| MyTextSanitizer::$config = array() |
Definition at line 202 of file module.textsanitizer.php.
| MyTextSanitizer::$path_basic |
Definition at line 192 of file module.textsanitizer.php.
| MyTextSanitizer::$path_plugin |
Definition at line 197 of file module.textsanitizer.php.
| MyTextSanitizer::$patterns = array() |
Definition at line 177 of file module.textsanitizer.php.
Referenced by codeConv(), codePreConv(), filterXss(), and xoopsCodeDecode().
| MyTextSanitizer::$replacements = array() |
Definition at line 182 of file module.textsanitizer.php.
Referenced by filterXss(), and xoopsCodeDecode().
| MyTextSanitizer::$smileys = array() |
Definition at line 162 of file module.textsanitizer.php.
Referenced by getSmileys().
| MyTextSanitizer::$text = "" |
Definition at line 172 of file module.textsanitizer.php.
Referenced by addSlashes(), censorString(), codeConv(), codePreConv(), displayTarea(), filterXss(), htmlSpecialChars(), makeClickable(), nl2Br(), previewTarea(), quoteConv(), stripSlashesGPC(), textFilter(), truncate(), undoHtmlSpecialChars(), and xoopsCodeDecode().