Making WordPress.org

Changeset 10733


Ignore:
Timestamp:
03/01/2021 06:20:29 AM (6 years ago)
Author:
dd32
Message:

Translate: When matching URLs in text, assume a URL will not contain a HTML tag, so exclude < from appearing within the URL.

Fixes #5155.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-custom-warnings/wporg-gp-custom-warnings.php

    r10732 r10733  
    3838                // Any http/https/schemeless URLs which are not encased in quotation marks
    3939                // nor contain whitespace and end with a valid URL ending char.
    40                 $urls_regex = '@(?<![\'"])((https?://|(?<![:\w])//)[^\s]+[a-z0-9\-_&=#/])(?![\'"])@i';
     40                $urls_regex = '@(?<![\'"])((https?://|(?<![:\w])//)[^\s<]+[a-z0-9\-_&=#/])(?![\'"])@i';
    4141
    4242                preg_match_all( $urls_regex, $original, $original_urls );
Note: See TracChangeset for help on using the changeset viewer.