/**
  * fix_special
  *
  * @param xxx $match
  * @param xxx $output (passed by reference)
  * @return xxx
  */
 function fix_special($output, $match)
 {
     $url = trim($match[1]);
     $player = trim($match[2]);
     $width = trim($match[3]);
     $height = trim($match[4]);
     $options = trim($match[5]);
     $space = trim($match[6]);
     // convert $url to $absoluteurl
     $absoluteurl = $output->convert_url_relative($url);
     //$absoluteurl = $output->convert_url($url, '');
     // set height equal to width, if necessary
     if ($width && !$height) {
         $height = $width;
     }
     //if ($player=='' && $this->image_filetypes && preg_match('/\.(?:'.$this->image_filetypes.')/i', $url)) {
     //    $player = 'img';
     //}
     //if ($player=='img' || $player=='image') {
     //    return '<img src="'.$absoluteurl.'" width="'.$width.'" height="'.$height.'" />';
     //}
     if ($player == '') {
         $player = $this->get_defaultplayer($url);
     }
     // $options_array will be passed to mediaplugin_filter
     $options_array = array();
     // add $player, $width and $height to $option_array
     if ($player == 'movie' || $player == 'object') {
         $options_array['movie'] = $absoluteurl;
         $options_array['skipmediaurl'] = true;
     } else {
         if ($player == 'center' || $player == 'hide') {
             $options_array[$player] = true;
             $player = '';
         } else {
             if ($player) {
                 $options_array['player'] = $player;
             }
         }
     }
     if ($width) {
         $options_array['width'] = $width;
     }
     if ($height) {
         $options_array['height'] = $height;
     }
     // transfer $options to $option_array
     if (preg_match_all('/([^ =\\]]+)(=((?:\\\\?"[^"]*")|\\w*))?/s', $options, $matches)) {
         $i_max = count($matches[0]);
         for ($i = 0; $i < $i_max; $i++) {
             $name = $matches[1][$i];
             if ($matches[2][$i]) {
                 $options_array[$name] = trim($matches[3][$i], '"\\');
             } else {
                 $options_array[$name] = true;
                 // boolean switch
             }
         }
     }
     // remove trailing space if player is to be centered or hidden
     if (!empty($options_array['center']) || !empty($options_array['hide'])) {
         $space = '';
     }
     $link = '<a href="' . $absoluteurl . '" target="_blank">' . $url . '</a>';
     return $this->fix_link($output, $options_array, $link) . $space;
 }