Skip to content

Commit

Permalink
Match images that have attributes before "src" as well
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-kuendig committed Feb 25, 2019
1 parent 173486b commit 9141f49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion classes/DomManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DomManipulator
* RegEx to find all images in the document.
* @var string
*/
protected $pattern = '/<img[\s\S][^>]?(?:src)=[\s\S]*?>/mis';
protected $pattern = '/<img[\s\S][^>]*(?:src)=[\s\S]*?>/mis';
/**
* DOMDocument instance to process each img tag.
* @var DOMDocument
Expand Down
1 change: 1 addition & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
2.0.3: Fixed handling of relative protocol urls
2.0.4: Added `svg` helper function to inline SVGs (see README for usage)
2.0.5: Added missing relations for Theme and SVGInliner classes
2.0.6: Optimized image matching to also include images with custom attributes before the src attribute

0 comments on commit 9141f49

Please sign in to comment.