Skip to:
Content

Changeset 6885


Ignore:
Timestamp:
12/20/2018 08:40:00 PM (4 weeks ago)
Author:
johnjamesjacoby
Message:

Formatting: update bbp_make_clickable() to better handle spaces in href attributes.

This change updates the included regular expression to avoid returning broken (or at least unexpected) HTML and allows spaces in href attributes to be encoded as expected.

Props dd32. Fixes #3237.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/formatting.php

    r6861 r6885  
    393393
    394394    // Cleanup of accidental links within links
    395     return preg_replace( '#(<a([ \r\n\t]+[^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );
     395    return preg_replace( '#(<a([ \r\n\t]+[^>]+?>|>))<a [^>]+?>([^>]+?)</a>([^<]*)</a>#i', "$1$3$4</a>", $r );
    396396}
    397397
Note: See TracChangeset for help on using the changeset viewer.