Re: Re: Converting HTML to BBCode [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hi,
I'm glad it worked (so far, hehe) Also, there's something I forgot to tell you (though I think you may as well be already doing this): there will be some unknown tags for the to_bbcode() function (even maybe some variations of those that it should recognize but it won't), so you should take care of those tags too, with something similar to this:

  $text = to_bbcode($text);        // try to convert to BBCode
  $text = strip_tags($text);       // get rid of remaining tags
  $text = htmlspecialchars($text); // replace basic HTML-entities

J_K9 wrote:
Hi,

Thank you for that - although I do have to admit that I don't understand a single bit of the reg-exp part. :)

It is now working flawlessly! Here is the final code I used:

[···]

Thank you very much for your help! I hope I get onto reg-exp and PREG stuff soon so that someday I might be able to understand that code.. :D

Good luck on that. Oh, a little correction: it should be PCRE not PREG, "preg_" is the functions prefix (my mistake, sorry)
--
Atentamente,
J. Rafael Salazar Magaña
Innox - Innovación Inteligente
Tel: +52 (33) 3615 5348 ext. 205 / 01 800 2-SOFTWARE
http://www.innox.com.mx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux