Zend Framework - Remove markup from bbcode


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public function bbcodeAction()
  2. {
  3. $bbcode = Zend_Markup::factory('Bbcode');
  4. $remover = array(
  5. //'b',
  6. //'i',
  7. 'cite',
  8. 'del',
  9. 'ins',
  10. 'sup',
  11. 'sub',
  12. 'span',
  13. 'acronym',
  14. 'url',
  15. 'h1',
  16. 'img',
  17. );
  18. foreach ($remover as $remove) {
  19. $bbcode->removeMarkup($remove);
  20. }
  21. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.