diff --git a/includes/ParsoidImageMap.php b/includes/ParsoidImageMap.php index 659ceef..7ad4a02 100644 --- a/includes/ParsoidImageMap.php +++ b/includes/ParsoidImageMap.php @@ -207,7 +207,7 @@ class ParsoidImageMap extends ExtensionTagHandler implements ExtensionModule { DOMUtils::assertElt( $a ); $href = $a->getAttribute( 'href' ); - $externLink = DOMUtils::matchRel( $a, '#^mw:ExtLink/#D' ) !== null; + $externLink = DOMUtils::matchRel( $a, '#^mw:ExtLink#D' ) !== null; $alt = ''; $hasContent = $externLink || ( DOMDataUtils::getDataParsoid( $a )->stx ?? null ) === 'piped'; diff --git a/tests/parser/imageMapParserTests.txt b/tests/parser/imageMapParserTests.txt index 2d28eda..996cbaa 100644 --- a/tests/parser/imageMapParserTests.txt +++ b/tests/parser/imageMapParserTests.txt @@ -334,3 +334,18 @@ Foobar.jpg !! html/parsoid-disabled

imagemap_no_image

!! end + +!! test +Imagemap with external link +!! config +wgParserEnableLegacyMediaDOM=false +!! wikitext + +File:Foobar.jpg +default [http://google.com] + +!! html/php +
+!! html/parsoid +
+!! end