1
tamerlo
How i can do and with TextSanitizer?
  • 2004/3/4 21:54

  • tamerlo

  • Just popping in

  • Posts: 71

  • Since: 2004/1/30


I have write a little and, for my site, usefull module that permit to users to leave message to others offences or praises ( link ).

This module don't have a good method to filter the input text byt I don't understand how use myTextSanitizer class to: delete message not well formatted (html tags i.e.) or introduce smiles.

There someone that can help me? (I think of yes )

2
Dave_L
Re: How i can do and with TextSanitizer?
  • 2004/3/4 23:04

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Here's an example that uses some of the MyTextSanitizer methods:

$myts =& MyTextSanitizer::getInstance();

// translate smileys
$text $myts->smiley($text);

// make links clickable
$text $myts->makeClickable($text);

// translate BB Code
$text $myts->xoopsCodeDecode($text0);


3
tamerlo
Re: How i can do and with TextSanitizer?
  • 2004/3/5 16:47

  • tamerlo

  • Just popping in

  • Posts: 71

  • Since: 2004/1/30


I need also that html that can be in input text are filter: changing < in < in example, what is the function that i must call?

thank for help

4
Dave_L
Re: How i can do and with TextSanitizer?
  • 2004/3/5 16:56

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I think that MyTextSanitizer::displayTarea() does that. These methods are in class/module.textsanitizer.php, if you want to see what they do.

5
tamerlo
Re: How i can do and with TextSanitizer?
  • 2004/3/5 17:17

  • tamerlo

  • Just popping in

  • Posts: 71

  • Since: 2004/1/30


I tried to use this method but there some problem with string that come from database, it don't convert slashes (\' remain \').

But with your help, and some tries I have solved my problem using $myts->smileys and an other function about slashes, all seem work well, many thanks dave

Login

Who's Online

340 user(s) are online (236 user(s) are browsing Support Forums)


Members: 0


Guests: 340


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits