<?php

/**
 * Goweb Sitemanager 5 Framework
 *
 * @version    5.1.7
 * @category   Goweb
 * @package    Goweb_View
 * @subpackage Helper
 * @author     I&D <dev@goweb.pt>, Pedro Pinto <ppinto@goweb.pt>
 * @copyright  2010 (c) Goweb (http://www.goweb.pt)
 */

goweb::loadClass('Zend_View_Helper_Abstract');

/**
 * Helper escapes a string so it can be safely echo'ed out a title
 *
 * @version    5.1.7
 * @category   Goweb
 * @package    Goweb_View
 * @subpackage Helper
 * @author     I&D <dev@goweb.pt>, Pedro Pinto <ppinto@goweb.pt>
 * @copyright  2010 (c) Goweb (http://www.goweb.pt)
 */
class Goweb_View_Helper_EscapeTitle extends Zend_View_Helper_Abstract{
    /**
     * escapes a string so it can be safely echo'ed out a title
     *
     * @param String $text
     * @param String $charset
     * @return String
     */
    public function EscapeTitle($text, $charset = null) {
        if (!$charset) {
            $charset = CHARSET;
        }
        return htmlspecialchars($text, ENT_QUOTES, $charset, false);
    }
}