-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't remove child nodes of figures and images.
When processing img elements, this was replacing figure and figure-inline with an img element. This was discarding any figcaption or other contents of the node. It doesn't look like there's any reason to do this replacement, as we're already modifying the img element to our requirements. Also switch to ctype_xdigit to check for the thumb URL segments being valid hex digits, because using is_numeric to do this was deprecated as of PHP 7.0. Also check for any contained img elements in figure etc. and break if none found. Bug: https://phabricator.wikimedia.org/T272307 Bug: https://phabricator.wikimedia.org/T272180
- Loading branch information
Showing
2 changed files
with
63 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters