return string
         */
        public function textarea_sanitizer_for_show($data)
        {
            return nl2br(htmlspecialchars($data, ENT_QUOTES));
        }

        /**
         * @param $data
         * @return string
         */
        public function text_sanitizer_for_show($data)
        {
            return htmlspecialchars($data, ENT_QUOTES);
        }

        /**
         * @param $data
         * @return string
         */
        public function textarea_sanitizer_for_edit($data)
        {
            return htmlspecialchars($data, ENT_QUOTES);
        }

        /**
         * @param $data
         * @return string
         */
        public function text_sanitizer_for_edit($data)
        {
            return htmlspecialchars($data, ENT_QUOTES);
        }

        /**
         * @param $data
         * @return mixed
         */
        public function textarea_sanitizer_for_export_ics($data)
        {
            return $data;
        }

        /*******************************************************************/
        /*        iCalendar ï¿½ï¿½ï¿½ï¿½Ø¿ï¿½                                       */
        /*******************************************************************/

        // iCalendarï¿½ï¿½ï¿½ï¿½ï¿½Ç¤Î¥Ð¥Ã¥ï¿½ï¿½ï¿½ï¿½Ï¥×¥ï¿½Ã¥È¥Õ¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ñ¥Õ¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ö¤ï¿½
        // $_POST['ids']ï¿½Ç»ï¿½ï¿½ï¿½
        /**
         * @param         $post_target
         * @param  string $target
         * @return string
         */
        public function output_ics_confirm($post_target, $target = '_self')
        {
            // POSTï¿½Ç¼ï¿½ï¿½ï¿½ï¿½ï¿½Ã¤ï¿½idï¿½ï¿½ï¿½ï¿½ï¿½event_idsï¿½ï¿½ï¿½ï¿½È¤ï¿½ï¿½ï¿½POSTï¿½ï¿½ï¿½ï¿½
            $hiddens = '';
            foreach ($_POST['ids'] as $id) {
                $id      = (int)$id;
                $hiddens.= "<input type='hidden' name='event_ids[]' value='$id' />\n";
            }
            // webcalï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½
            $webcal_url = str_replace('http://', 'webcal://', $post_target);

            // ï¿½ï¿½Ç§ï¿½Õ¥ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ö¤ï¿½
            return "
    <div style='text-align:center;width:100%;'>&nbsp;<br><b>". _APCAL_MB_APCALICALSELECTPLATFORM. "</b><br>&nbsp;</div>
    <table border='0' cellpadding='5' cellspacing='2' width='100%'>
    <tr>
    <td align='right' width='50%'>
    <form action='$post_target?output_ics=1' method='post' target='$target'>
        $hiddens
        <input type='submit' name='do_output' value='". _APCAL_BTN_OUTPUTICS_WIN. "' />
    </form>
    </td>
    <td align='left' width='50%'>
    <form action='$webcal_url?output_ics=1' method='post' target='$target'>
        $hiddens
        <input type='submit' name='do_output' value='". _APCAL_BTN_OUTPUTICS_MAC. "' />
    </form>
    </td>
    </tr>
    </table><br><br>\n";
        }

        // iCalendarï¿½ï¿½ï¿½ï¿½ï¿½Ç¤Î½ï¿½ï¿½ï¿½ (mbstringÉ¬ï¿½ï¿½)
        // ï¿½ï¿½ï¿½Ï¤ï¿½ï¿½ï¿½ï¿½Î¤ß¤Î¾ï¿½ï¿½ï¿½$_GET['event_id']ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Î¾ï¿½ï¿½ï¿½$_POST['event_ids']
        public function output_ics()
        {
            // $event_id ï¿½ï¿½ï¿½ï¿½ï¿½ê¤µï¿½ï¿½Æ¤ï¿½ï¿½Ê¤ï¿½ï¿½ï¿½Ð½ï¿½Î»
            if (empty($_GET['event_id']) && empty($_POST['event_ids'])) {
                die(_APCAL_ERR_INVALID_EVENT_ID);
            }

            // iCalendarï¿½ï¿½ï¿½Ïµï¿½ï¿½Ä¤ï¿½ï¿½Ê¤ï¿½ï¿½ï¿½Ð½ï¿½Î»
            if (!$this->can_output_ics) {
                die(_APCAL_ERR_NOPERM_TO_OUTPUTICS);
            }
            if (isset($_GET['event_id'])) {
                // $_GET[ 'event_id' ] ï¿½Ë¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Î»ï¿½ï¿½ï¿½Î¾ï¿½ï¿½
                $event_id  = (int)$_GET['event_id'];
                $event_ids = array($event_id);
                //                $rs        = $xoopsDB->query("SELECT summary AS udtstmp FROM $this->table WHERE id='$event_id'");
                $rs = $GLOBALS['xoopsDB']->query("SELECT summary AS udtstmp FROM $this->table WHERE id='$event_id'");

                if ($GLOBALS['xoopsDB']->getRowsNum($rs) < 1) {
                    die(_APCAL_ERR_INVALID_EVENT_ID);
                }
                //                $summary = mysql_result($rs, 0, 0);
                $summary   = 0;
                $resultRow = $GLOBALS['xoopsDB']->fetchRow($rs);
                if (false!== $resultRow && isset($resultRow[$field])) {
                    $summary = $resultRow[0];
                }
                //                $rs = $xoopsDB->query("SELECT * FROM $cal->table WHERE WHERE id='$event_id'");

                // ï¿½ï¿½Ì¾ ï¿½ï¿½ X-WR-CALNAME ï¿½È¤ï¿½ï¿½ï¿½
                $x_wr_calname = $summary;
                // ï¿½Õ¥ï¿½ï¿½ï¿½ï¿½ï¿½Ì¾ï¿½Ë»È¤ï¿½ï¿½Ê¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Ê¸ï¿½ï¿½Ïºï¿½ï¿½
                if (function_exists('mb_ereg_replace')) {
                    $summary = mb_ereg_replace('[<>|"?*,:;\\/]', '', $summary);
                } else {
                    $summary = preg_replace('/[<>|"?*,:;\\/]/', '', $summary);
                }
                // ï¿½Ø»ï¿½Ê¸ï¿½ï¿½ï¿½ï¿½Ã¤ï¿½ï¿½ï¿½Ì¾.ics ï¿½ï¿½Õ¥ï¿½ï¿½ï¿½ï¿½ï¿½Ì¾ï¿½È¤ï¿½ï¿½ï¿½ (ï¿½ï¿½SJISï¿½Ñ´ï¿½)
                $output_filename = mb_convert_encoding($summary, 'ASCII'). '.ics';
                $output_filename = str_replace(' ', '', $output_filename);
            } elseif