static function newXml() { $tags = new com_wiris_plugin_impl_TextFilterTags(); $tags->in_open = "<"; $tags->in_close = ">"; $tags->in_entity = "&"; $tags->in_quote = "'"; $tags->in_double_quote = "\""; $tags->init($tags); return $tags; }
public function filter($str, $prop) { $saveMode = null; if ($prop !== null) { $saveMode = com_wiris_system_PropertiesTools::getProperty($prop, "savemode", null); } if ($saveMode === null) { $saveMode = $this->plugin->getConfiguration()->getProperty(com_wiris_plugin_api_ConfigurationKeys::$SAVE_MODE, "xml"); } $b = null; $b = $saveMode === "safeXml"; $tags = null; if ($b) { $tags = com_wiris_plugin_impl_TextFilterTags::newSafeXml(); } else { $tags = com_wiris_plugin_impl_TextFilterTags::newXml(); } $str = $this->filterMath($tags, $str, $prop, $b); $str = $this->filterApplet($tags, $str, $prop, $b); return $str; }