public function strip_applet_tags_get_mathml($string) {
        if (stristr($string, '</APPLET>') === false) {
            return $string;
        } else {
            // Strip all applet tags keeping stuff before/after and inbetween (if mathml) them.
            while (stristr($string, '</APPLET>') !== false) {
                preg_match("/(.*)\<applet.*value=\"(\<math\>.*\<\/math\>)\".*\<\/applet\>(.*)/i", $string, $mathmls);
                $string = $mathmls[1].$mathmls[2].$mathmls[3];
            }
            return $string;
        }
    }
public function strip_applet_tags_get_mathml($string) {
        if (stristr($string, '</APPLET>') === false) {
            return $string;
        } else {
            // Strip all applet tags keeping stuff before/after and inbetween (if mathml) them.
            while (stristr($string, '</APPLET>') !== false) {
                preg_match("/(.*)\<applet.*value=\"(\<math\>.*\<\/math\>)\".*\<\/applet\>(.*)/i", $string, $mathmls);
                $string = $mathmls[1].$mathmls[2].$mathmls[3];
            }
            return $string;
        }
    }
public function strip_applet_tags_get_mathml ( $ string ) { if ( stristr ( $ string , '</APPLET>' ) === false ) { return $ string ; } else { // Strip all applet tags keeping stuff before/after and inbetween (if mathml) them. while ( stristr ( $ string , '</APPLET>' ) !== false ) { preg_match ( "/(.*)\<applet.*value=\"(\<math\>.*\<\/math\>)\".*\<\/applet\>(.*)/i" , $ string , $ mathmls ) ; $ string = $ mathmls [ 1 ] . $ mathmls [ 2 ] . $ mathmls [ 3 ] ; } return $ string ; } }
Strip the applet tag used by Blackboard to render mathml formulas,
keeping the mathml tag.
@param string $string
@return string
Strip the applet tag used by Blackboard to render mathml formulas keeping the mathml tag .