Make WordPress Core

Ticket #31645: 31645.patch

File 31645.patch, 879 bytes (added by kraftbj, 10 years ago)

Exclude URLs that begin with /

  • wp-admin/includes/class-wp-press-this.php

     
    347347                        return ''; // Return empty rather than a trunacted/invalid URL
    348348                }
    349349
    350                 // Does it look like an URL?
    351                 if ( ! preg_match( '/^([!#$&-;=?-\[\]_a-z~]|%[0-9a-fA-F]{2})+$/', $url ) ) {
     350                // Does it look like an absolute URL?
     351                if ( '/' === $url[0] || ! preg_match( '/^([!#$&-;=?-\[\]_a-z~]|%[0-9a-fA-F]{2})+$/', $url ) ) {
    352352                        return '';
    353353                }
    354354
     
    995995                        } else if ( ! empty( $data['_meta']['description'] ) ) {
    996996                                $text = $data['_meta']['description'];
    997997                        }
     998                        if ( substr($text, -3, 3) == '...' || substr($text, -5, 5 == '[…]') ) {
     999                                $text = '';
     1000                        }
    9981001                }
    9991002
    10001003                $default_html = array(