Physikerwelt has uploaded a new change for review. https://gerrit.wikimedia.org/r/105646
Change subject: new option setXMLValidate to skip xml validation ...................................................................... new option setXMLValidate to skip xml validation for some corner cases in the context of MathSearch results that are xml rather than xhtml are welcome Change-Id: I1315ff701dd0795ca1967cdf76ee070bdde75e27 --- M MathLaTeXML.php 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math refs/changes/46/105646/1 diff --git a/MathLaTeXML.php b/MathLaTeXML.php index 2e8d0af..053ead8 100644 --- a/MathLaTeXML.php +++ b/MathLaTeXML.php @@ -15,6 +15,8 @@ * @var String settings for LaTeXML daemon */ private $LaTeXMLSettings = ''; + /** @var boolean if false LaTeXML output is not validated*/ + private $XMLValidation = true; /** * Converts an array with LaTeXML settings to a URL encoded String. * If the argument is a string the input will be returned. @@ -217,6 +219,14 @@ return false; } } + /** + * Sets the XML validaton. + * If set to false the output of LaTeXML is not validated. + * @param boolean $newval + */ + public function setXMLValidaton($newval = true){ + $this->XMLValidation = $newval; + } /** * Checks if the input is valid MathML, @@ -225,6 +235,9 @@ * @return boolean */ public function isValidMathML( $XML ) { + if ( !$this->XMLValidation ){ + return true; + } $out = false; // depends on https://gerrit.wikimedia.org/r/#/c/66365/ if ( !is_callable( 'XmlTypeCheck::newFromString' ) ) { -- To view, visit https://gerrit.wikimedia.org/r/105646 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1315ff701dd0795ca1967cdf76ee070bdde75e27 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Math Gerrit-Branch: dev Gerrit-Owner: Physikerwelt <w...@physikerwelt.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits