Skip to content

Commit

Permalink
Strip mw:PageProp meta tags
Browse files Browse the repository at this point in the history
These have no purpose in epubs and cause validation failures.

Bug: T287548
  • Loading branch information
samwilson authored and Tpt committed Nov 8, 2021
1 parent 0a56e74 commit 95892c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PageParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ public function getContent( $isMainPage ) {
$this->removeNodesWithXpath( '//a[@class="mw-headline-anchor"]' );
$this->removeNodesWithXpath( '//div[@class="mediaContainer"]' );
$this->removeNodesWithXpath( '//link[@rel="mw:PageProp/Category"]' );
// Remove meta tags such as <meta property="mw:PageProp/disambiguation" about="#mwt1" />
$this->removeNodesWithXpath( '//meta[starts-with(@property, "mw:PageProp/")]' );
$this->removeNodesWithXpath( '//link[contains(@typeof, "mw:Extension")]' );
$this->deprecatedNodes( 'big', 'span', 'font-size:large;' );
$this->deprecatedNodes( 'center', 'div', 'text-align:center;' );
Expand Down

0 comments on commit 95892c0

Please sign in to comment.