EBernhardson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/195600
Change subject: Allow unexpected end tag to pass through createDOM
......................................................................
Allow unexpected end tag to pass through createDOM
Change-Id: I7444b51f7133f4993f7cdcfef0898825f8340839
---
M includes/Parsoid/Utils.php
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/00/195600/1
diff --git a/includes/Parsoid/Utils.php b/includes/Parsoid/Utils.php
index e69c691..7891430 100644
--- a/includes/Parsoid/Utils.php
+++ b/includes/Parsoid/Utils.php
@@ -176,6 +176,7 @@
* ignored will throw a WikitextException.
*
* The default error codes allowed are:
+ * 76 - allow unexpected end tag. This is typically old wikitext
using deprecated tags.
* 513 - allow multiple tags with same id
* 801 - allow unrecognized tags like figcaption
*
@@ -185,7 +186,7 @@
* @throws WikitextException
* @see http://www.xmlsoft.org/html/libxml-xmlerror.html
*/
- public static function createDOM( $content, $ignoreErrorCodes = array(
513, 801 ) ) {
+ public static function createDOM( $content, $ignoreErrorCodes = array(
76, 513, 801 ) ) {
$dom = new DOMDocument();
// Otherwise the parser may attempt to load the dtd from an
external source.
@@ -213,6 +214,7 @@
libxml_use_internal_errors( $useErrors );
if ( $errors ) {
+ var_dump( $errors );
throw new WikitextException(
implode( "\n", array_map( function( $error ) {
return $error->message; }, $errors ) )
. "\n\nFrom source content:\n" . $content,
--
To view, visit https://gerrit.wikimedia.org/r/195600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7444b51f7133f4993f7cdcfef0898825f8340839
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits