Here comes a list of all the methods / functions that are deprecated (and will be removed in the next release). Feel free to add other ones to the list as you encounter them. Text sanitizer
Almost everything is deprecated except:
* function &smiley($message) * function &makeClickable(&$text) * function &xoopsCodeDecode(&$text, $allowimage = 1) * function &nl2Br($text) * function &addSlashes($text) * function &htmlSpecialChars($text) * function &undoHtmlSpecialChars(&$text) * function &displayTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) * function &previewTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
Now the old ones, with the correct equivalent:
* function makeTboxData4Save($text) * function makeTareaData4Save($text)
--> $ts->addSlashes($text);
* function makeTboxData4Show($text, $smiley=0) * function makeTboxData4Edit($text) * function makeTareaData4InsideQuotes($text) * function makeTareaData4Edit($text)
-->$ts->htmlSpecialChars($text);
* function makeTboxData4Preview($text, $smiley=0) * function makeTboxData4PreviewInForm($text) * function makeTareaData4PreviewInForm($text)
-->$ts->htmlSpecialChars( $ts->stripSlashesGPC($text) );
* function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)
-->$ts->displayTarea($text, $html, $smiley, $xcode);
* function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)
-->$ts->previewTarea($text, $html, $smiley, $xcode);
Skalpa
Warning, addSlashes, makeTboxData4Save, makeTareaData4Save and oopsAddSlashes will only add slashes to your datas when they are coming from a form or a cookie. This example will not be sanitized :
$data="that's good";
$sandata=$myts->addSlashes($data);
As a result, you will have an error when you will try to insert a such data in the database because the quote will not be escaped.
Hervé
Back to the dev:Main Page

![[Main Page]](/modules/mediawiki/images/mediawiki.png)





