WordPress.org

Plugin Directory

Changeset 627731


Ignore:
Timestamp:
11/20/12 15:40:19 (17 months ago)
Author:
ethitter
Message:

Photon regex update

Ensure that more than one whitespace character can appear between an a tag and its nested img tag and still be Photon'd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/photon.php

    r627333 r627731  
    8686     */ 
    8787    public function filter_the_content( $content ) { 
    88         if ( false != preg_match_all( '#(<a.+?href=["|\'](.+?)["|\'].+?>\s?)?(<img.+?src=["|\'](.+?)["|\'].+?/?>){1}(\s?</a>)?#i', $content, $images ) ) { 
     88        if ( false != preg_match_all( '#(<a.+?href=["|\'](.+?)["|\'].+?>\s*)?(<img.+?src=["|\'](.+?)["|\'].+?/?>){1}(\s*</a>)?#i', $content, $images ) ) { 
    8989            global $content_width; 
    9090 
Note: See TracChangeset for help on using the changeset viewer.